Fixing bad return in controller
This commit is contained in:
parent
12d6d9a50d
commit
f5464fb1af
1 changed files with 4 additions and 2 deletions
|
@ -32,7 +32,8 @@ export class AdminController extends BaseController {
|
||||||
const body = await res.json();
|
const body = await res.json();
|
||||||
|
|
||||||
if (ADMIN_API_TOKEN === "") {
|
if (ADMIN_API_TOKEN === "") {
|
||||||
return res.writeStatus("401 Unauthorized").end("No token configured!");
|
res.writeStatus("401 Unauthorized").end("No token configured!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (token !== ADMIN_API_TOKEN) {
|
if (token !== ADMIN_API_TOKEN) {
|
||||||
console.error("Admin access refused for token: " + token);
|
console.error("Admin access refused for token: " + token);
|
||||||
|
@ -82,7 +83,8 @@ export class AdminController extends BaseController {
|
||||||
const body = await res.json();
|
const body = await res.json();
|
||||||
|
|
||||||
if (ADMIN_API_TOKEN === "") {
|
if (ADMIN_API_TOKEN === "") {
|
||||||
return res.writeStatus("401 Unauthorized").end("No token configured!");
|
res.writeStatus("401 Unauthorized").end("No token configured!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (token !== ADMIN_API_TOKEN) {
|
if (token !== ADMIN_API_TOKEN) {
|
||||||
console.error("Admin access refused for token: " + token);
|
console.error("Admin access refused for token: " + token);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue