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);
|
const params = extractParamsFromRequest(req, res, _options.params.find);
|
||||||
try {
|
try {
|
||||||
console.log('parammmmmmmasr', params);
|
|
||||||
const result = await service.fetchAll(params, buildContext(req, config));
|
const result = await service.fetchAll(params, buildContext(req, config));
|
||||||
console.log('controllllerrrrrrrrrrrrrrrr', result);
|
|
||||||
return handleResultResponse(result.rows, result.count, params, res);
|
return handleResultResponse(result.rows, result.count, params, res);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return handleErrorResponse(_options.MODULE_NAME, 'find', error, res)
|
return handleErrorResponse(_options.MODULE_NAME, 'find', error, res)
|
||||||
|
|||||||
@ -31,7 +31,7 @@ routes.get('/events',
|
|||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
if (!req.body.city)
|
if (!req.body.city)
|
||||||
return eventController.find({
|
return eventController.find({
|
||||||
// scopes: ['defaultScope', 'includeVenue', 'includeMultimedias', 'includeDetails'],
|
scopes: ['defaultScope', 'includeVenue', 'includeMultimedias', 'includeDetails'],
|
||||||
})(req, res, next)
|
})(req, res, next)
|
||||||
else
|
else
|
||||||
return eventController.find({
|
return eventController.find({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user