Last active
August 29, 2015 14:08
-
-
Save sjcotto/6f05493d0571eab455e1 to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
* @autor santiago | |
*/ | |
var model = kona.model.open('User'); | |
var post = function(req) { // POST User to KONA Backend | |
var item = req.body; | |
model.insert(item); | |
return item.get("_id").toString(); //return the id of the created object | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment