UpdateUpdate expiration
This commit is contained in:
parent
e24260a2fe
commit
54fd64b9e3
@ -37,7 +37,7 @@ exports.login = async (req, res) => {
|
|||||||
const token = jwt.sign(
|
const token = jwt.sign(
|
||||||
{ id: user.id, role: user.role },
|
{ id: user.id, role: user.role },
|
||||||
process.env.JWT_SECRET,
|
process.env.JWT_SECRET,
|
||||||
{ expiresIn: "1d" }
|
{ expiresIn: "1 year" }
|
||||||
);
|
);
|
||||||
|
|
||||||
res.json({ token, username, role: user.role });
|
res.json({ token, username, role: user.role });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user