a
This commit is contained in:
parent
e080548da9
commit
d52df0bc68
@ -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)
|
||||
|
||||
@ -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({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user