Last active
August 29, 2015 14:00
-
-
Save SetiZ/cc8ad3c1f5b81269545d 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
| // 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); | |
| }) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something is my model where I have an id _id