diff --git a/src/app/components/home/workspace/infos/infos.component.ts b/src/app/components/home/workspace/infos/infos.component.ts index efce719..d5900d5 100644 --- a/src/app/components/home/workspace/infos/infos.component.ts +++ b/src/app/components/home/workspace/infos/infos.component.ts @@ -30,11 +30,21 @@ export class InfosComponent implements OnInit { private toast:ToastrService ) { } ngOnInit(): void { + this.bs.retreiveDatetime().subscribe( + (data:Datetime) => { + this.dateStr = data.today; + }, err => { + if(err.status == 401) { + this.router.navigateByUrl("/login"); + } else { + this.toast.error(err.error.description); + } + } + ); setInterval(() => { this.bs.retreiveDatetime().subscribe( (data:Datetime) => { this.dateStr = data.today; - console.log("=> retreive today: {}", this.today); }, err => { if(err.status == 401) { this.router.navigateByUrl("/login");