mirror of
https://github.com/naturalcrit/naturalcrit.git
synced 2025-10-27 07:29:54 +00:00
Extraneous intending
This commit is contained in:
parent
201416514f
commit
99daaf9be2
@ -15,11 +15,11 @@ function generateUserToken(req, res) {
|
||||
|
||||
// Login API
|
||||
router.post('/login', async (req, res) => {
|
||||
const { user, pass } = req.body;
|
||||
const jwt = await AccountModel.login(user, pass)
|
||||
.catch(err => res.status(err.status || 500).json(err) );
|
||||
if(jwt)
|
||||
res.json(jwt);
|
||||
const { user, pass } = req.body;
|
||||
const jwt = await AccountModel.login(user, pass)
|
||||
.catch(err => res.status(err.status || 500).json(err) );
|
||||
if(jwt)
|
||||
res.json(jwt);
|
||||
});
|
||||
|
||||
// Render login page
|
||||
|
||||
Loading…
Reference in New Issue
Block a user