fix: 500 when loggin in
This commit is contained in:
parent
5afdbad461
commit
a091387c1c
3 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
import { inject, Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { KeycloakProfile } from 'keycloak-js';
|
||||
import { Observable } from 'rxjs';
|
||||
import { catchError, EMPTY, Observable } from 'rxjs';
|
||||
import { User } from '../model/User';
|
||||
|
||||
@Injectable({
|
||||
|
@ -11,7 +11,7 @@ export class UserService {
|
|||
private http: HttpClient = inject(HttpClient);
|
||||
|
||||
public getUser(id: string): Observable<User | null> {
|
||||
return this.http.get<User | null>(`/backend/user/${id}`);
|
||||
return this.http.get<User | null>(`/backend/user/${id}`).pipe(catchError(() => EMPTY));
|
||||
}
|
||||
|
||||
public createUser(id: string, username: string): Observable<User> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue