Skip to content

Instantly share code, notes, and snippets.

@mkozhukharenko
Created October 30, 2016 18:09
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 mkozhukharenko/cf067d95f38f3184d763df7477e54667 to your computer and use it in GitHub Desktop.
Save mkozhukharenko/cf067d95f38f3184d763df7477e54667 to your computer and use it in GitHub Desktop.
User.findOneAndUpdate({}, (err, user) => {
if (err) { // !!!!!
return res.status(500).send(err)
}
// everething is ok, do smth
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment