Skip to content

Instantly share code, notes, and snippets.

@deveshkumar
Created Jun 30, 2013
Embed
What would you like to do?
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