fixed invalid unauathorized handler

This commit is contained in:
jonny 2021-07-01 15:50:40 +02:00
parent 63391e657f
commit 65cefb3584
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export class DebugController {
const query = parse(req.getQuery()); const query = parse(req.getQuery());
if (query.token !== ADMIN_API_TOKEN) { if (query.token !== ADMIN_API_TOKEN) {
return res.status(401).send("Invalid token sent!"); return res.writeStatus("401 Unauthorized").end("Invalid token sent!");
} }
return res return res

View File

@ -16,7 +16,7 @@ export class DebugController {
const query = parse(req.getQuery()); const query = parse(req.getQuery());
if (query.token !== ADMIN_API_TOKEN) { if (query.token !== ADMIN_API_TOKEN) {
return res.status(401).send("Invalid token sent!"); return res.writeStatus("401 Unauthorized").end("Invalid token sent!");
} }
return res return res