Created
June 20, 2012 20:04
-
-
Save aheckmann/2961877 to your computer and use it in GitHub Desktop.
v3-p1-save-comment
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
Post.findById(postId, function (err, post) { | |
// handle errors .. | |
post.comments.push({ body: someText, user: userId }); | |
post.save(callback); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
asdf