diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-04-30 20:04:42 +0200 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-04-30 20:04:42 +0200 |
commit | 45c519d53fee1124c2882c7b353cd930fd311f9e (patch) | |
tree | aa0221d1a0e609a3b070d1231d094148a36744ed /frontend | |
parent | 0f4941df7a7655f95ecd9934ddb21484a1168e32 (diff) |
Stranica se refreshuje po dodeli tokena Guesta ili Usera da bi se refreshovala komunikacija preko webSocketa. Potrebno izmeniti u buducnosti.
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/src/app/_modals/login-modal/login-modal.component.ts | 2 | ||||
-rw-r--r-- | frontend/src/app/_services/auth.service.ts | 1 | ||||
-rw-r--r-- | frontend/src/app/app.component.ts | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/frontend/src/app/_modals/login-modal/login-modal.component.ts b/frontend/src/app/_modals/login-modal/login-modal.component.ts index 062a0550..ccd78509 100644 --- a/frontend/src/app/_modals/login-modal/login-modal.component.ts +++ b/frontend/src/app/_modals/login-modal/login-modal.component.ts @@ -50,7 +50,9 @@ export class LoginModalComponent implements OnInit { this.userInfoService.getUserInfo().subscribe((response) => { shared.photoId = response.photoId; }); + location.reload(); } + }); } else { diff --git a/frontend/src/app/_services/auth.service.ts b/frontend/src/app/_services/auth.service.ts index 92920b24..68c29182 100644 --- a/frontend/src/app/_services/auth.service.ts +++ b/frontend/src/app/_services/auth.service.ts @@ -64,6 +64,7 @@ export class AuthService { addGuestToken() { this.getGuestToken().subscribe((token) => { this.authenticate(token); + location.reload(); }); } diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index dfe4febc..e301b46f 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -43,7 +43,7 @@ export class AppComponent implements OnInit, AfterViewInit { if(!this.authService.alreadyGuest()) this.authService.addGuestToken(); } - //this.signalRService.startConnection(); + this.signalRService.startConnection(); //this.startHttpRequest(); } } |