Reduce slightly the amount of dependencies

This commit is contained in:
Dadoum 2023-06-17 12:40:20 +02:00
parent 962d2a695a
commit 37713043ee
2 changed files with 11 additions and 5 deletions

View File

@ -11,7 +11,8 @@
"version": "b131c625da882700cdda46fcc5172b79eed25f43"
},
"slf4d": "~>2.1.1",
"vibe-d": "~>0.9.7-alpha.2"
"vibe-d:web": "~>0.9.7-alpha.2",
"vibe-d:http": "~>0.9.7-alpha.2"
},
"configurations": [

View File

@ -1,3 +1,4 @@
import core.time;
import core.memory;
import std.algorithm.searching;
@ -16,7 +17,11 @@ import std.uni;
import std.uuid;
import std.zip;
import vibe.d;
import vibe.core.core;
import vibe.http.websockets;
import vibe.http.server;
import vibe.http.router;
import vibe.web.web;
import slf4d;
import slf4d: Logger;
@ -175,7 +180,7 @@ class AnisetteService {
"X-Mme-Device-Id": v1Device.uniqueDeviceIdentifier,
];
response.headers["Implementation-Version"] = brandingCode;
res.headers["Implementation-Version"] = brandingCode;
res.writeBody(responseJson.toString(JSONOptions.doNotEscapeSlashes), "application/json");
log.infoF!"[>>] 200 OK %s"(responseJson);
}
@ -190,8 +195,8 @@ class AnisetteService {
"user_agent": "akd/1.0 CFNetwork/808.1.4"
];
response.headers["Implementation-Version"] = brandingCode;
response.writeBody(responseJson.toString(JSONOptions.doNotEscapeSlashes), "application/json");
res.headers["Implementation-Version"] = brandingCode;
res.writeBody(responseJson.toString(JSONOptions.doNotEscapeSlashes), "application/json");
}
@method(HTTPMethod.POST)