Created
October 8, 2017 19:12
-
-
Save NMZivkovic/effa2f64ec9349252ed013f833b79ca1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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