We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
res
1 parent f00a4c2 commit eb7d50cCopy full SHA for eb7d50c
app/templates/server/api/thing/thing.controller.js
@@ -62,11 +62,11 @@ exports.create = function(req, res) {
62
exports.update = function(req, res) {
63
if(req.body._id) { delete req.body._id; }
64
Thing.findById(req.params.id, function (err, thing) {
65
- if (err) { return handleError(err); }
+ if (err) { return handleError(res, err); }
66
if(!thing) { return res.send(404); }
67
var updated = _.merge(thing, req.body);
68
updated.save(function (err) {
69
70
return res.json(200, thing);
71
});
72
0 commit comments