Skip to content

Commit

Permalink
Merge pull request #7 from TheMohit2003/TheMohit2003-patch-2
Browse files Browse the repository at this point in the history
Update authController.js
  • Loading branch information
TheMohit2003 authored Feb 21, 2024
2 parents 5b39b3c + 687e26e commit 1eab31c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const register = async (req, res) => {
const token = jsonwebtoken.sign(
{ userId: user.id, email: user.email },
JWT_SECRET,
{ expiresIn: '1h' }
{ expiresIn: '6h' }
);
res.status(201).json({ token });
} catch (error) {
Expand Down Expand Up @@ -69,7 +69,7 @@ const login = async (req, res) => {
const token = jsonwebtoken.sign(
{ userId: user.id, email: user.email, role: user.role },
JWT_SECRET,
{ expiresIn: '1h' }
{ expiresIn: '6h' }
);
res.status(200).json({ token });
};
Expand Down

0 comments on commit 1eab31c

Please sign in to comment.