Skip to content
Permalink
Browse files

Create: POST /todos

  • Loading branch information
amejiarosario committed Oct 2, 2014
1 parent 54ab912 commit 28b60c4bf9c6d8b08c3351f725e17c7f40a077be
Showing with 9 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 routes/todos.js
@@ -0,0 +1 @@
node_modules
@@ -12,4 +12,12 @@ router.get('/', function(req, res, next) {
});
});

/* POST /todos */
router.post('/', function(req, res, next) {
Todo.create(req.body, function (err, post) {
if (err) return next(err);
res.json(post);
});
});

module.exports = router;

0 comments on commit 28b60c4

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