From 0236c9b76ead29a0b256345f56c03f48898eec90 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 21 Jul 2019 11:27:08 +0200 Subject: [PATCH] . --- core/controllers/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/controllers/index.js b/core/controllers/index.js index f846cff..de2c73c 100644 --- a/core/controllers/index.js +++ b/core/controllers/index.js @@ -5,6 +5,7 @@ const { extractParamsFromRequest, handleErrorResponse, handleResultResponse } = function buildContext(req, config) { return { user: req.user, + scopes: [], ...config, } } @@ -50,6 +51,7 @@ const generateControllers = (service, extraControllers = {}, options = {}) => { const result = await service.fetchOne(params, buildContext(req, config)); return handleResultResponse(result, null, params, res, (result === null) ? httpStatus.NOT_FOUND : httpStatus.OK); } catch (error) { + console.log(error); handleErrorResponse(_options.MODULE_NAME, 'findOne', error, res) } }