diff --git a/src/app/components/home/workspace/hours/hours.component.ts b/src/app/components/home/workspace/hours/hours.component.ts index 30bffc0..f77545a 100644 --- a/src/app/components/home/workspace/hours/hours.component.ts +++ b/src/app/components/home/workspace/hours/hours.component.ts @@ -30,7 +30,11 @@ export class HoursComponent implements OnInit { this.schedRows = Object.keys(datas[0].horaires).length; this.isProcessing = false; }, 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; } );