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) } }