From 47f4a4d5581585ec0c3cc52457707374ba34c96e Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 2 Apr 2025 16:21:56 +0200 Subject: [PATCH] style(user.service.ts): format code for clarity and consistency --- frontend/src/app/service/user.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/service/user.service.ts b/frontend/src/app/service/user.service.ts index 3c64e34..4a0d781 100644 --- a/frontend/src/app/service/user.service.ts +++ b/frontend/src/app/service/user.service.ts @@ -48,12 +48,12 @@ export class UserService { // Authentik format might differ from Keycloak // Check different possible locations for the ID and username const info = profile['info'] as Record | undefined; - const id = info?.['sub'] as string || profile['sub'] as string; + const id = (info?.['sub'] as string) || (profile['sub'] as string); const username = - info?.['preferred_username'] as string || - profile['preferred_username'] as string || - profile['email'] as string || - profile['name'] as string; + (info?.['preferred_username'] as string) || + (profile['preferred_username'] as string) || + (profile['email'] as string) || + (profile['name'] as string); if (!id || !username) { console.error('Could not extract user ID or username from profile', profile);