Updated schema

This commit is contained in:
Sahat Yalkabov
2013-11-18 13:53:06 -05:00
parent 8e637defc5
commit 94b04f54e5

View File

@ -33,9 +33,12 @@ exports.postSignup = function(req, res) {
password: req.body.password
});
console.log(req.body);
// TODO: add User.schema.path validation
// TODO: check if user already exists in user.save() by catching that error
user.save(function(err) {
if (err) throw err;
console.log('New user created');
req.login(user, function(err) {
if (err) throw err;