[develop]: Add userInfoUrl variable in user management service.

This commit is contained in:
Konstantinos Triantafyllou 2024-02-13 11:57:46 +02:00
parent 14cd46bdb4
commit 5195306ee6
1 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,11 @@ export class UserManagementService {
this.routerSubscription.unsubscribe();
}
}
public static userInfoUrl(index = 0): string {
return (isArray(properties.loginServiceURL)?properties.loginServiceURL[index]:properties.loginServiceURL) + UserManagementService.USERINFO;
}
public get user(): User {
return this.getUserInfoSubject.getValue();
}
@ -45,8 +49,7 @@ export class UserManagementService {
}
public getUserInfoAt(index = 0): Observable<User> {
return this.http.get<User>((isArray(properties.loginServiceURL)?properties.loginServiceURL[index]:properties.loginServiceURL) +
UserManagementService.USERINFO, CustomOptions.registryOptions()).pipe(map(userInfo => {
return this.http.get<User>(UserManagementService.userInfoUrl(index), CustomOptions.registryOptions()).pipe(map(userInfo => {
return new User(userInfo);
}))
}