This commit is contained in:
David Arranz 2019-08-26 17:44:48 +02:00
parent e080548da9
commit d52df0bc68
2 changed files with 1 additions and 3 deletions

View File

@ -39,9 +39,7 @@ const generateControllers = (service, extraControllers = {}, options = {}) => {
const params = extractParamsFromRequest(req, res, _options.params.find);
try {
console.log('parammmmmmmasr', params);
const result = await service.fetchAll(params, buildContext(req, config));
console.log('controllllerrrrrrrrrrrrrrrr', result);
return handleResultResponse(result.rows, result.count, params, res);
} catch (error) {
return handleErrorResponse(_options.MODULE_NAME, 'find', error, res)

View File

@ -31,7 +31,7 @@ routes.get('/events',
(req, res, next) => {
if (!req.body.city)
return eventController.find({
// scopes: ['defaultScope', 'includeVenue', 'includeMultimedias', 'includeDetails'],
scopes: ['defaultScope', 'includeVenue', 'includeMultimedias', 'includeDetails'],
})(req, res, next)
else
return eventController.find({