Skip to content

Commit

Permalink
fix(app:server:thing.controller): missing res param for handleError…
Browse files Browse the repository at this point in the history
… added
  • Loading branch information
meeDamian authored and DaftMonk committed Jul 16, 2014
1 parent f00a4c2 commit eb7d50c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/templates/server/api/thing/thing.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ exports.create = function(req, res) {
exports.update = function(req, res) {
if(req.body._id) { delete req.body._id; }
Thing.findById(req.params.id, function (err, thing) {
if (err) { return handleError(err); }
if (err) { return handleError(res, err); }
if(!thing) { return res.send(404); }
var updated = _.merge(thing, req.body);
updated.save(function (err) {
if (err) { return handleError(err); }
if (err) { return handleError(res, err); }
return res.json(200, thing);
});
});
Expand Down

0 comments on commit eb7d50c

Please sign in to comment.