Skip to content

Commit

Permalink
adding minor fixes to the files
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyg37 committed Apr 29, 2024
1 parent 92a7b32 commit 2a1beb2
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 @@ -84,7 +84,7 @@ router.post('/guest/login', async (req: Request, res: Response) => {
const match = await bcrypt.compare(password, user.password);
if (match) {
const token = jwt.sign({username: user.username}, 'guest_token', {expiresIn: '1h'});
return res.json({message: 'Login successful', token});
return res.json({message: 'Login successful', token, username});
} else {
return res.status(401).json({message: 'Invalid credentials'});
}
Expand Down

0 comments on commit 2a1beb2

Please sign in to comment.