Skip to content

Commit

Permalink
finalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyg37 committed Apr 26, 2024
1 parent 1e1ba44 commit bd459c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/routes/authRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ router.post('/admin/login', async (req: Request, res: Response) => {
const match = await bcrypt.compare(password, user.password);
if (match) {
const token = jwt.sign({username: user.username}, 'secret', {expiresIn: '1h'});
return res.json({message: 'Login successful', token});
return res.json({message: 'Login successful', token, username, account});
} else {
return res.status(401).json({message: 'Invalid credentials'});
}
Expand Down

0 comments on commit bd459c4

Please sign in to comment.