diff options
| author | jw255 | 2018-03-06 16:50:03 +0000 |
|---|---|---|
| committer | jw255 | 2018-03-06 16:50:03 +0000 |
| commit | f3491957d8599a7ba97d9cb324274df49b6fdbd0 (patch) | |
| tree | 98fbc253b0f5d3f140450b339d01da1c8055b052 /src | |
| parent | Merge branch 'trh/payload-checker' into testing-middleware (diff) | |
| download | medicine-f3491957d8599a7ba97d9cb324274df49b6fdbd0.tar.gz medicine-f3491957d8599a7ba97d9cb324274df49b6fdbd0.zip | |
authentication tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/auth.ts | 2 | ||||
| -rw-r--r-- | src/errors/errorware.ts | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/src/auth.ts b/src/auth.ts index 5a1707c..6339260 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -112,9 +112,7 @@ export class AuthRouter { // Handle error if user is unauthorised export const unauthorisedErr: Errorware = (err: Error, req: Request, res: Response, next: NextFunction): void => { - console.log('fffff'); if (err.name === 'UnauthorizedError') { - console.log('efewfwf'); return next(new RequestError( 401, 'not_authorised', 'user does not have correct authorisation for task' diff --git a/src/errors/errorware.ts b/src/errors/errorware.ts index e2355de..b01f83b 100644 --- a/src/errors/errorware.ts +++ b/src/errors/errorware.ts @@ -53,9 +53,7 @@ export type Errorware = export const errorHandler: Errorware = (err: Error, req: Request, res: Response, next: NextFunction): void => { - console.log(err); if (RequestError.is(err)) { - console.log('fewkuihfklsfv'); res.status(err.code) .json(err.responseBlock()); } else { |
