Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions module-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ router.route('/posts')
.post(function(req, res){

//TODO create a new post in the database
req.send({message:"TODO create a new post in the database"});
res.send({message:"TODO create a new post in the database"});
})

.get(function(req, res){

//TODO get all the posts in the database
req.send({message:"TODO get all the posts in the database"});
res.send({message:"TODO get all the posts in the database"});
})


Expand Down Expand Up @@ -277,15 +277,15 @@ router.route('/posts/:id')

//create
.put(function(req,res){
return res.send({message:'TODO modify an existing post by using param ' + req.param.id});
return res.send({message:'TODO modify an existing post by using param ' + req.params.id});
})

.get(function(req,res){
return res.send({message:'TODO get an existing post by using param ' + req.param.id});
return res.send({message:'TODO get an existing post by using param ' + req.params.id});
})

.delete(function(req,res){
return res.send({message:'TODO delete an existing post by using param ' + req.param.id})
return res.send({message:'TODO delete an existing post by using param ' + req.params.id})
});

module.exports = router;
Expand Down