aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/app.component.ts
diff options
context:
space:
mode:
authorSonja Galovic <galovicsonja@gmail.com>2022-03-29 23:06:16 +0200
committerSonja Galovic <galovicsonja@gmail.com>2022-03-29 23:06:16 +0200
commitdf2a11aae7a522d50e1e0f97e6a45788b9120c10 (patch)
treef4cc72bffc7205a3350d0b2c17fa28239b3cfb0e /frontend/src/app/app.component.ts
parent4921fd48c358c11aa5d16d08bea4d0ab3f41272a (diff)
parente8790a5b30170a99fc6ef61e24614456543febd7 (diff)
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into dev
Diffstat (limited to 'frontend/src/app/app.component.ts')
-rw-r--r--frontend/src/app/app.component.ts7
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();
+ }
}
}