fix: fixed jwt expiracy

This commit is contained in:
Lukian 2025-06-26 17:02:29 +02:00
parent eca9efc170
commit ca9642ec27

View file

@ -40,7 +40,7 @@ router.post('/login', speedLimiter, limiter, async (req, res) => {
if (user[0]) { if (user[0]) {
if (user[0].password === sha256(password)) { if (user[0].password === sha256(password)) {
const token = jwt.sign({ id: user[0].id }, process.env.JWT_SECRET, { const token = jwt.sign({ id: user[0].id }, process.env.JWT_SECRET, {
expiresIn: 1000 * 60 * 60 * 24 * 7, expiresIn: 60 * 60 * 24 * 7,
}); });
return res.send({ token: token }); return res.send({ token: token });
} }