Skip to content

Commit

Permalink
OV-5: * change getUserIdFromToken
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano-lacorazza committed Aug 25, 2024
1 parent 1723fa8 commit 1ce3a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/common/services/token/token.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TokenService {

public async getUserIdFromToken(token: string): Promise<number | null> {
const payload = await this.verifyToken(token);
return (payload?.['userId'] as number) ?? null;
return (payload?.['userId'] as number) || null;
}
}

Expand Down

0 comments on commit 1ce3a2e

Please sign in to comment.