From ae542d5a3e683508d8b1f623d7a12f7837f98e44 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Tue, 23 Apr 2019 17:59:32 +0200 Subject: [PATCH] FIX #10391 TIME 0:45 Reload page when 401 --- src/frontend/app/notification.service.ts | 1 + src/frontend/app/profile.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/app/notification.service.ts b/src/frontend/app/notification.service.ts index 7320855a268..23d6bc6f026 100755 --- a/src/frontend/app/notification.service.ts +++ b/src/frontend/app/notification.service.ts @@ -35,6 +35,7 @@ export class NotificationService { console.log(err); if (err.status === 401 && this.router.url !== '/home') { this.router.navigate(['/home']); + window.location.reload(true); this.error(this.lang.mustReconnect); } else if (err.status === 0 && err.statusText === 'Unknown Error') { this.error(this.lang.connectionFailed); diff --git a/src/frontend/app/profile.component.ts b/src/frontend/app/profile.component.ts index e764893f4e7..cbff836e40d 100755 --- a/src/frontend/app/profile.component.ts +++ b/src/frontend/app/profile.component.ts @@ -891,7 +891,7 @@ export class ProfileComponent extends AutoCompletePlugin implements OnInit { return this.lang.passwordcomplexitySpecial + ' !'; } else { - this.firstFormGroup.controls['newPasswordCtrl'].setErrors(null) + this.firstFormGroup.controls['newPasswordCtrl'].setErrors(null); this.validPassword = true; return ''; } @@ -931,7 +931,7 @@ export class ProfileComponent extends AutoCompletePlugin implements OnInit { this.notify.success(this.lang.signsSynchronized); }, (err) => { this.loadingSign = false; - this.notify.error(err.error.errors); + this.notify.handleErrors(err); }); } } -- GitLab