From f3491957d8599a7ba97d9cb324274df49b6fdbd0 Mon Sep 17 00:00:00 2001 From: jw255 Date: Tue, 6 Mar 2018 16:50:03 +0000 Subject: authentication tests --- src/auth.ts | 2 -- src/errors/errorware.ts | 2 -- 2 files changed, 4 deletions(-) (limited to 'src') 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 { -- cgit v1.2.1 From 5800b44d5baa04e64b76dd170b2dfd1bbc6d034f Mon Sep 17 00:00:00 2001 From: jw255 Date: Wed, 7 Mar 2018 12:26:38 +0000 Subject: another try --- src/db/initPostgresDB.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/db/initPostgresDB.ts b/src/db/initPostgresDB.ts index eb979f4..b6844d9 100644 --- a/src/db/initPostgresDB.ts +++ b/src/db/initPostgresDB.ts @@ -1,6 +1,6 @@ import * as Sequelize from 'sequelize'; const gres: Sequelize.Sequelize = new Sequelize( - 'postgres://admin:eprprJacR0hBpmWvs5IDJZTnjRAY2gM3tSm0b1af@localhost:5432/be4', + 'postgres://admin:eprprJacR0hBpmWvs5IDJZTnjRAY2gM3tSm0b1af@postgres:5432/be4', { operatorsAliases : false } -- cgit v1.2.1