Skip to content

Instantly share code, notes, and snippets.

@SetiZ
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save SetiZ/cc8ad3c1f5b81269545d to your computer and use it in GitHub Desktop.

Select an option

Save SetiZ/cc8ad3c1f5b81269545d to your computer and use it in GitHub Desktop.
// get one
exports.getSomething = function (req, res) {
return Something.findOne({_id : req.params.somethingId}, function (err, something){
if (!err)
return res.send(something);
else
return console.log(err);
})
}
@SetiZ
Copy link
Author

SetiZ commented May 2, 2014

Something is my model where I have an id _id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment