Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
router.post('/updateUser', function(req, res, next) {
var user = new User(req.body);
User.update({_id : user.id}, user, function(err) {
if (err) {
console.log("not updated!");
res.status(400);
res.send();
}
console.log("updated!");
res.send({status: 'ok'});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment