From 2af4fa4d8ba69424a279402e1e3f9e09a90c7e45 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 19 Jan 2018 14:47:03 +0100 Subject: [PATCH] Fix tests --- server/helpers/logger.ts | 3 ++- server/middlewares/oauth.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 6a02f680a..10e8cabc8 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts @@ -24,8 +24,9 @@ function keysExcluder (key, value) { const loggerFormat = winston.format.printf((info) => { let additionalInfos = JSON.stringify(info, keysExcluder, 2) if (additionalInfos === '{}') additionalInfos = '' + else additionalInfos = ' ' + additionalInfos - return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message} ${additionalInfos}` + return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` }) const timestampFormatter = winston.format.timestamp({ diff --git a/server/middlewares/oauth.ts b/server/middlewares/oauth.ts index 41a3fb718..3cda41e5c 100644 --- a/server/middlewares/oauth.ts +++ b/server/middlewares/oauth.ts @@ -1,6 +1,7 @@ import * as express from 'express' import * as OAuthServer from 'express-oauth-server' import 'express-validator' +import { logger } from '../helpers/logger' import { OAUTH_LIFETIME } from '../initializers' const oAuthServer = new OAuthServer({ -- 2.25.1