Skip to content

Commit

Permalink
Update backend/src/common/services/token/token.services.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Otroshchenko <[email protected]>
  • Loading branch information
stefano-lacorazza and anton-otroshchenko authored Aug 22, 2024
1 parent 9b53386 commit 90ac229
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 90ac229

Please sign in to comment.