diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-03-29 15:17:38 +0000 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-03-29 15:17:38 +0000 |
commit | f3d5f6fa046912c996e2581d9082087ccf7919d6 (patch) | |
tree | a2d08f934062cb840d1c0b4379200201e6a38554 /frontend/src/app/app.component.ts | |
parent | 28e3d25b5d4756361b464e8ca34fbc986fc0e75f (diff) | |
parent | 2ca55fc8c9879a2d06e364ee3c88a9cfffa6f299 (diff) |
Merge branch 'Guest-Front-Back' into 'dev'
Omoguceno da guest korisnik dobija Jwt token koji se takodje osvezava.I da...
See merge request igrannonica/neuronstellar!26
Diffstat (limited to 'frontend/src/app/app.component.ts')
-rw-r--r-- | frontend/src/app/app.component.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index f5ae5786..8c6f8452 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { filter, map } from 'rxjs'; +import { AuthService } from './_services/auth.service'; @Component({ selector: 'app-root', @@ -10,7 +11,7 @@ import { filter, map } from 'rxjs'; }) export class AppComponent implements OnInit { - constructor(private router: Router, private titleService: Title) { } + constructor(private router: Router, private titleService: Title,private authService:AuthService) { } ngOnInit() { this.router.events @@ -33,5 +34,9 @@ export class AppComponent implements OnInit { this.titleService.setTitle(`${title} - Igrannonica`); } }); + if(!this.authService.isAuthenticated()) + { + this.authService.addGuestToken(); + } } } |