diff --git a/frontend/src/app/service/user.service.ts b/frontend/src/app/service/user.service.ts index ba6bead..20573ff 100644 --- a/frontend/src/app/service/user.service.ts +++ b/frontend/src/app/service/user.service.ts @@ -14,6 +14,10 @@ export class UserService { return this.http.get(`/backend/user/${id}`).pipe(catchError(() => EMPTY)); } + public getCurrentUser(): Observable { + return this.http.get('/backend/user').pipe(catchError(() => EMPTY)); + } + public createUser(id: string, username: string): Observable { return this.http.post('/backend/user', { keycloakId: id, diff --git a/frontend/src/app/shared/components/navbar/navbar.component.html b/frontend/src/app/shared/components/navbar/navbar.component.html index 0294aa0..ed6c4de 100644 --- a/frontend/src/app/shared/components/navbar/navbar.component.html +++ b/frontend/src/app/shared/components/navbar/navbar.component.html @@ -11,6 +11,11 @@