Skip to content
Permalink
Browse files

DELETE /todos/:id

  • Loading branch information
amejiarosario committed Oct 2, 2014
1 parent 00dafe4 commit cbf5366e2b4e1a683ed50d2148ed6a548616d3f8
Showing with 8 additions and 0 deletions.
  1. +8 −0 routes/todos.js
@@ -36,4 +36,12 @@ router.put('/:id', function(req, res, next) {
});
});

/* DELETE /todos/:id */
router.delete('/:id', function(req, res, next) {
Todo.findByIdAndRemove(req.params.id, req.body, function (err, post) {
if (err) return next(err);
res.json(post);
});
});

module.exports = router;

0 comments on commit cbf5366

Please sign in to comment.
You can’t perform that action at this time.