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

View File

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

View File

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

View File

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

View File

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

View File

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