Skip to content

Instantly share code, notes, and snippets.

@deveshkumar
Created June 30, 2013 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deveshkumar/5895844 to your computer and use it in GitHub Desktop.
Save deveshkumar/5895844 to your computer and use it in GitHub Desktop.
5 Code Signals
app.delete('/api/friends/:_id', function (req, res){
return Friends.findById(req.params._id, function (err, friend) {
return friend.remove(function (err) {
if (!err) {
console.log("Friend removed");
return res.send('');
} else {
console.log(err);
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment