Skip to content

Commit

Permalink
Update: Added nodemon and SwaggerJS
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Nov 1, 2024
1 parent 813e3b1 commit f77274c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ router.post(
}
};

jwt.sign(payload, JWT_SECRET, { expiresIn: '24h' }, (err, token) => {
jwt.sign(payload, JWT_SECRET, { expiresIn: '48h' }, (err, token) => {
if (err) throw err;
res.json({ token });
});
Expand Down Expand Up @@ -199,7 +199,7 @@ router.post(
}
};

jwt.sign(payload, JWT_SECRET, { expiresIn: '24h' }, (err, token) => {
jwt.sign(payload, JWT_SECRET, { expiresIn: '48h' }, (err, token) => {
if (err) throw err;
res.json({ token });
});
Expand Down Expand Up @@ -303,7 +303,7 @@ router.post(
],
async (req, res) => {
const errors = validationResult(req);

if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() });
}
Expand Down

0 comments on commit f77274c

Please sign in to comment.