correction bug sur reception 401 depuis la page horaires

This commit is contained in:
2022-10-23 19:07:48 +02:00
parent a39f6b02df
commit 01118e5d4e

View File

@@ -30,7 +30,11 @@ export class HoursComponent implements OnInit {
this.schedRows = Object.keys(datas[0].horaires).length; this.schedRows = Object.keys(datas[0].horaires).length;
this.isProcessing = false; this.isProcessing = false;
}, err => { }, err => {
this.toast.error("Erreur de récupération des horaires"); if(err.status == 401) {
this.router.navigateByUrl("/login");
} else {
this.toast.error("Erreur de récupération des horaires");
}
this.isProcessing = false; this.isProcessing = false;
} }
); );