hadpagsjiopafdouiaejwkewrran
This commit is contained in:
@@ -30,6 +30,6 @@ export class APIErrors extends API {
|
|||||||
endpoint() {
|
endpoint() {
|
||||||
this.res
|
this.res
|
||||||
.status(this.errors.status.code)
|
.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() {
|
endpoint() {
|
||||||
this.res
|
this.res
|
||||||
.status(201)
|
.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() {
|
endpoint() {
|
||||||
this.res
|
this.res
|
||||||
.status(201)
|
.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() {
|
async endpoint() {
|
||||||
this.res
|
await this.res
|
||||||
.status(200)
|
.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.Token = token.token;
|
||||||
|
|
||||||
response.endpoint();
|
await response.endpoint();
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export class StatusCodes {
|
export class StatusCodes {
|
||||||
static pageNotFound(req, res, next) {
|
static pageNotFound(req, res, next) {
|
||||||
res.status(404).end('404 Page not found');
|
res.status(404).send('404 Page not found');
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user