login endpoint cleanup
parent
c2296772d1
commit
a5b5d90702
|
@ -18,7 +18,8 @@ router.get('/session', requireAuthenticated, async (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/login', bodyParser.urlencoded({ extended: true }), async (req, res) => {
|
router.post('/login', bodyParser.urlencoded({ extended: true }), async (req, res) => {
|
||||||
const signIn = await authenticationController.signIn(req.body.email, req.body.password);
|
const { email, password } = req.body;
|
||||||
|
const signIn = await authenticationController.signIn(email, password);
|
||||||
if (!signIn.success) {
|
if (!signIn.success) {
|
||||||
return res.status(401).json(signIn);
|
return res.status(401).json(signIn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue