feat(navbar): add current user balance display in navbar

This commit is contained in:
Jan-Marlon Leibl 2025-03-05 12:05:46 +01:00
parent 63db07b6ae
commit 564601f7bc
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
3 changed files with 22 additions and 1 deletions

View file

@ -14,6 +14,10 @@ export class UserService {
return this.http.get<User | null>(`/backend/user/${id}`).pipe(catchError(() => EMPTY));
}
public getCurrentUser(): Observable<User | null> {
return this.http.get<User | null>(`/backend/user`).pipe(catchError(() => EMPTY));
}
public createUser(id: string, username: string): Observable<User> {
return this.http.post<User>('/backend/user', {
keycloakId: id,