hadpagsjiopafdouiaejwkewrran
This commit is contained in:
@@ -30,6 +30,6 @@ export class APIErrors extends API {
|
||||
endpoint() {
|
||||
this.res
|
||||
.status(this.errors.status.code)
|
||||
.end(JSON.stringify(this.errors, false, 4));
|
||||
.send(JSON.stringify(this.errors, false, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ export class NoteAPI extends API {
|
||||
endpoint() {
|
||||
this.res
|
||||
.status(201)
|
||||
.end(JSON.stringify(this.response, false, 4));
|
||||
.send(JSON.stringify(this.response, false, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,6 @@ export class PermaLinkAPI extends API {
|
||||
endpoint() {
|
||||
this.res
|
||||
.status(201)
|
||||
.end(JSON.stringify(this.response, false, 4));
|
||||
.send(JSON.stringify(this.response, false, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ export class UserAPI extends API {
|
||||
}
|
||||
}
|
||||
|
||||
endpoint() {
|
||||
this.res
|
||||
async endpoint() {
|
||||
await this.res
|
||||
.status(200)
|
||||
.end(JSON.stringify(this.response, false, 4));
|
||||
.send(JSON.stringify(this.response, false, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class LoginController extends ControllerHandler {
|
||||
}
|
||||
response.Token = token.token;
|
||||
|
||||
response.endpoint();
|
||||
await response.endpoint();
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export class StatusCodes {
|
||||
static pageNotFound(req, res, next) {
|
||||
res.status(404).end('404 Page not found');
|
||||
res.status(404).send('404 Page not found');
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user