fix: fix.env.example

This commit is contained in:
2025-06-14 15:05:20 +07:00
parent b52f1202eb
commit ac10ae14f6
75 changed files with 2532 additions and 2532 deletions

View File

@ -1,14 +1,14 @@
import jwt from "jsonwebtoken";
export const jwtDecode = (payload: string) => {
// return payload;
if (!payload) throw "JWT decode payload not found";
const JWTKey = process.env.JWT_SECRET!;
try {
const decodedPayload = jwt.verify(payload, JWTKey);
return decodedPayload;
} catch (error) {
throw "JWT expired or not valid";
}
};
import jwt from "jsonwebtoken";
export const jwtDecode = (payload: string) => {
// return payload;
if (!payload) throw "JWT decode payload not found";
const JWTKey = process.env.JWT_SECRET!;
try {
const decodedPayload = jwt.verify(payload, JWTKey);
return decodedPayload;
} catch (error) {
throw "JWT expired or not valid";
}
};