Created
October 26, 2012 20:27
-
-
Save shinecita/3961284 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
Model.addOrganization = function(model, organizationId, done) { | |
console.log("model:", model, "organizationId" , organizationId ) | |
Model.save({_id:model._id, $addToSet: {organizations: toObjectId(organizationId)}}, function(err) { | |
console.log(err); | |
done(null, model); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
App Online @ port 8000
model: { _id: 508af1a9bdaeb50000000001,
email: '[email protected]',
token: '2f934c2de5c8f5292f4ad0e9e3ecf08f6e5b0b61',
status: 'invited' } organizationId 5087f7e11f5926a035000003
null