Move register route from auth to manage
parent
b7f032754b
commit
4a108f606b
|
@ -34,9 +34,6 @@ router.post('/login',
|
||||||
console.log(req.user);
|
console.log(req.user);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/register', adminLoggedIn, (req, res, next) => {
|
|
||||||
accounts.createUser(req.body.email, req.body.password, !!req.body.admin)
|
|
||||||
.then(res.redirect('/manage'));
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
Reference in New Issue