From d0346f5073f0780bbca378010b044f5051183852 Mon Sep 17 00:00:00 2001 From: shahar-y Date: Thu, 24 Sep 2020 09:58:06 +0300 Subject: [PATCH] fix objectTypes Signed-off-by: shahar-y --- src/utils/logger.ts | 2 +- src/utils/middleware.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 5d9c342..66d396e 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,7 +1,7 @@ import * as winston from 'winston'; import * as os from 'os'; import * as elasticsearch from 'winston-elasticsearch'; -import { confLogger, debugMode, useElastic, indexTemplateMapping, serviceName } from './config'; +import { confLogger, debugMode, useElastic, indexTemplateMapping, serviceName } from '../config'; export const logger: winston.Logger = winston.createLogger({ defaultMeta: { service: serviceName, hostname: os.hostname() }, diff --git a/src/utils/middleware.ts b/src/utils/middleware.ts index 98b48e3..83547dc 100644 --- a/src/utils/middleware.ts +++ b/src/utils/middleware.ts @@ -27,9 +27,9 @@ enum ObjectType { function concludeObjectType(type: string) { switch(type) { - case 'file': + case 'files': return ObjectType.FILE; - case 'permission': + case 'permissions': return ObjectType.PERMISSION; default: return ObjectType.NONE;