after creating user, redirect back to home page

master
Matt Huntington 9 years ago
parent 9b5b2771e4
commit 557ab89681

@ -12,7 +12,7 @@ controller.get('/new', function(req, res){
controller.post('/', function(req, res){
req.body.password = bcrypt.hashSync(req.body.password, bcrypt.genSaltSync(10));
Users.create(req.body).then(function(createdUser){
res.json(createdUser);
res.redirect('/');
});;
});

Loading…
Cancel
Save