style: format code for consistency and readability
All checks were successful
All checks were successful
This commit is contained in:
parent
e983b21e07
commit
4a7c54eab8
3 changed files with 18 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue