hadpagsjiopafdouiaejwkewrran

This commit is contained in:
Ben
2018-11-17 14:34:39 +00:00
parent ec3cd30aa1
commit 7369d0bd68
6 changed files with 8 additions and 8 deletions

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -51,7 +51,7 @@ export class LoginController extends ControllerHandler {
}
response.Token = token.token;
response.endpoint();
await response.endpoint();
next();
}
}

View File

@@ -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();
}
}