sq.title = new RegExp("^" + pattern + ".*$", 'i');
}
Show.find(sq).lean().limit(limit)
- .then(responseWithResult(res, true))
- .catch(handleError(res));
+ .then(responseWithResult(res, true), handleError(res));
+ /*.catch(handleError(res));*/
};
exports.show = function(req, res) {
Show.findById(req.params.id).lean()
.then(handleEntityNotFound(res))
- .then(responseWithResult(res))
- .catch(handleError(res));
+ .then(responseWithResult(res), handleError(res));
+ /*.catch(handleError(res));*/
};
// Creates a new Show in the DB
exports.create = function(req, res) {
Show.createAsync(req.body)
- .then(responseWithResult(res, 201))
- .catch(handleError(res));
+ .then(responseWithResult(res, 201), handleError(res));
+ /*.catch(handleError(res));*/
};
// Updates an existing Show in the DB