Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created October 8, 2017 19:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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