Rework of major pages
This commit is contained in:
@@ -75,7 +75,17 @@ export class UserService {
|
||||
getUserObservable(): Observable<User> {
|
||||
return this.user$;
|
||||
}
|
||||
async getId(): Promise<string> {
|
||||
if (sessionStorage.getItem('USERID')) {
|
||||
return sessionStorage.getItem('USERID');
|
||||
} else {
|
||||
const user = await this.getByMail(this.user.email);
|
||||
sessionStorage.setItem('USERID', user.id);
|
||||
return user.id;
|
||||
}
|
||||
}
|
||||
logout() {
|
||||
sessionStorage.removeItem('USERID');
|
||||
this.keycloak.logout(window.location.origin + '/home');
|
||||
}
|
||||
async login(url: string) {
|
||||
|
||||
Reference in New Issue
Block a user