Skip to content

Instantly share code, notes, and snippets.

@ssube
Forked from Technoash/help.js
Last active March 1, 2016 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssube/a5a55a9e83fb8cf67bf0 to your computer and use it in GitHub Desktop.
Save ssube/a5a55a9e83fb8cf67bf0 to your computer and use it in GitHub Desktop.
validateRegister(req.body).then(function(){
return db.createUser(req.body.name, req.body.email, req.body.password);
}).then(function(newUser){
console.log(2);
res.send({state: 'success', name: newUser.name});
}).catch(function(err){
res.send(500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment