fix(services): 🐛 types on return value

This commit is contained in:
Mathis H (Avnyr) 2024-04-23 15:11:52 +02:00
parent 3b41cf1c5a
commit 71c20c8a06
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -8,10 +8,10 @@ const logger = new Logger({ name: "JwtService" });
* *
* @param {string | Uint8Array} jwt * @param {string | Uint8Array} jwt
* - The JWT token to verify. * - The JWT token to verify.
* @returns {Promise<null | object>} * @returns {Promise<null | JWTPayload>}
* - The payload of the verified JWT token or null if verification fails. * - The payload of the verified JWT token or null if verification fails.
*/ */
async function JwtVerifyService(jwt: string | Uint8Array): Promise<null | object> { async function JwtVerifyService(jwt: string | Uint8Array): Promise<null | JWTPayload> {
try { try {
const result = await Jose.jwtVerify( const result = await Jose.jwtVerify(
jwt, jwt,