Added redirect after user credentials change
This commit is contained in:
@@ -44,9 +44,10 @@ export class AdminuiComponent {
|
||||
|
||||
async init() {
|
||||
this.username = await firstValueFrom(this.authStore.username$);
|
||||
await this.verifyToken();
|
||||
setInterval(() => {
|
||||
this.verifyToken();
|
||||
}, 1000);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
async verifyToken() {
|
||||
@@ -81,6 +82,12 @@ export class AdminuiComponent {
|
||||
this.edit_user_modal?.nativeElement.showModal();
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.authStore.setToken("");
|
||||
this.authStore.setUsername("");
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
|
||||
async fetchFileUploads() {
|
||||
try {
|
||||
const response = await axios({
|
||||
|
Reference in New Issue
Block a user