Pre Yoeman
[YouAndWeb_TwoToc] / server / api / show / show.controller.js
index 2a5c2d8..b70dce4 100755 (executable)
@@ -113,8 +113,8 @@ exports.index = function(req, res) {
     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));*/
 };
 
 
@@ -122,15 +122,15 @@ exports.index = function(req, 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