feat: Add Python video server and improve playback
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
837e02ef4c
commit
e6537884a3
+4
-1
@@ -76,6 +76,9 @@ function isAdminFromDecoded(decoded) {
|
||||
|
||||
function signUserToken(user) {
|
||||
const isAdmin = user.role === 69;
|
||||
const expiresIn = typeof process.env.JWT_EXPIRES_IN === "string" && process.env.JWT_EXPIRES_IN.trim()
|
||||
? process.env.JWT_EXPIRES_IN.trim()
|
||||
: "8h";
|
||||
return jwt.sign(
|
||||
{
|
||||
id: user._id,
|
||||
@@ -84,7 +87,7 @@ function signUserToken(user) {
|
||||
mustChangePassword: !!user.mustChangePassword,
|
||||
},
|
||||
process.env.JWT_SECRET,
|
||||
{ expiresIn: "1h" }
|
||||
{ expiresIn }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user