Skip to content
Permalink
Browse files

Show: GET /todos/:id

  • Loading branch information...
amejiarosario committed Oct 2, 2014
1 parent 28b60c4 commit 7d8bc67178a4f162858395845c076d9223926bf8
Showing with 8 additions and 0 deletions.
  1. +8 −0 routes/todos.js
@@ -20,4 +20,12 @@ router.post('/', function(req, res, next) {
});
});

/* GET /todos/id */
router.get('/:id', function(req, res, next) {
Todo.findById(req.params.id, function (err, post) {
if (err) return next(err);
res.json(post);
});
});

module.exports = router;

0 comments on commit 7d8bc67

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