style: format code for consistency and readability
All checks were successful
CI / Get Changed Files (pull_request) Successful in 6s
CI / eslint (pull_request) Successful in 19s
CI / test-build (pull_request) Successful in 27s
CI / prettier (pull_request) Successful in 40s
CI / Checkstyle Main (pull_request) Successful in 1m28s

This commit is contained in:
Jan-Marlon Leibl 2025-04-02 10:26:11 +02:00
parent e983b21e07
commit 4a7c54eab8
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
3 changed files with 18 additions and 10 deletions

View file

@ -20,14 +20,14 @@ export class UserService {
public getUser(id: string): Observable<User | null> {
return this.http.get<User | null>(`/backend/user/${id}`).pipe(
catchError(() => EMPTY),
tap(user => this.currentUserSubject.next(user))
tap((user) => this.currentUserSubject.next(user))
);
}
public getCurrentUser(): Observable<User | null> {
return this.http.get<User | null>('/backend/user').pipe(
catchError(() => EMPTY),
tap(user => this.currentUserSubject.next(user))
tap((user) => this.currentUserSubject.next(user))
);
}
@ -36,12 +36,12 @@ export class UserService {
}
public createUser(id: string, username: string): Observable<User> {
return this.http.post<User>('/backend/user', {
keycloakId: id,
username: username,
}).pipe(
tap(user => this.currentUserSubject.next(user))
);
return this.http
.post<User>('/backend/user', {
keycloakId: id,
username: username,
})
.pipe(tap((user) => this.currentUserSubject.next(user)));
}
public async getOrCreateUser(userProfile: KeycloakProfile) {