From 080bcb2a636f81eeac7a1046eab37478ddeeba6c Mon Sep 17 00:00:00 2001 From: stefano-lacorazza <112132737+stefano-lacorazza@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:36:37 -0500 Subject: [PATCH] OV-5: * change getUserIdFromToken --- backend/src/common/services/token/token.services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/common/services/token/token.services.ts b/backend/src/common/services/token/token.services.ts index c117b5c0f..1a5de4163 100644 --- a/backend/src/common/services/token/token.services.ts +++ b/backend/src/common/services/token/token.services.ts @@ -28,7 +28,7 @@ class TokenService { public async getUserIdFromToken(token: string): Promise { const payload = await this.verifyToken(token); - return (payload?.['userId'] as number) ?? null; + return (payload?.['userId'] as number) || null; } }