Fixed minor issues with login & logout. Cleaned up the UI.

This commit is contained in:
Tom
2025-01-09 18:11:44 +00:00
parent d595c3500e
commit 2692294b4b
8 changed files with 128 additions and 86 deletions

View File

@ -59,10 +59,10 @@ export class ImpersonationComponent implements OnInit {
body: {
impersonation: e.value
}
}).subscribe((data: any) => {
}).subscribe(async (data: any) => {
this.hermes.disconnect();
this.events.emit('impersonation', e.value);
this.router.navigate(['/tts-login']);
await this.router.navigate(['tts-login']);
});
} else {
this.http.put(environment.API_HOST + '/admin/impersonate', {
@ -71,10 +71,10 @@ export class ImpersonationComponent implements OnInit {
headers: {
'Authorization': 'Bearer ' + localStorage.getItem('jwt')
}
}).subscribe((data: any) => {
}).subscribe(async (data: any) => {
this.hermes.disconnect();
this.events.emit('impersonation', e.value);
this.router.navigate(['/tts-login']);
await this.router.navigate(['tts-login']);
});
}
}