Fixing warning in lint

This commit is contained in:
David Négrier 2021-12-03 18:29:36 +01:00
parent 0a3417e813
commit 6427d85c24

View File

@ -11,7 +11,8 @@ export class DebugController {
}
getDump() {
this.App.get("/dump", async (res: HttpResponse, req: HttpRequest) => {
this.App.get("/dump", (res: HttpResponse, req: HttpRequest) => {
(async () => {
const query = parse(req.getQuery());
if (query.token !== ADMIN_API_TOKEN) {
@ -49,6 +50,12 @@ export class DebugController {
}
})
);
})().catch(e => {
console.error(e);
res.writeStatus("500");
res.end("An error occurred");
});
});
}
}