From f77274c339f2406763c8f44a736d2e2f7f3ef6d5 Mon Sep 17 00:00:00 2001 From: Son Nguyen Date: Fri, 1 Nov 2024 15:46:49 -0400 Subject: [PATCH] Update: Added nodemon and SwaggerJS --- backend/routes/auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/routes/auth.js b/backend/routes/auth.js index d37dd0b..034d4be 100644 --- a/backend/routes/auth.js +++ b/backend/routes/auth.js @@ -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 }); }); @@ -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 }); }); @@ -303,7 +303,7 @@ router.post( ], async (req, res) => { const errors = validationResult(req); - + if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }); }