aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/app.component.ts
diff options
context:
space:
mode:
authorDanijel Andjelkovic <adanijel99@gmail.com>2022-03-30 12:41:53 +0200
committerDanijel Andjelkovic <adanijel99@gmail.com>2022-03-30 12:41:53 +0200
commitad9193d35e5ae2f6847492f1867963fc1672ee3e (patch)
treebe3b3a54bc42696e73f3c3092a9f52db8355c07f /frontend/src/app/app.component.ts
parent6af8655c2d1a24c0c3ba851bb28d72f9d06c83b0 (diff)
parent476393d1530b261b8a145db2533262979558e064 (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();
+ }
}
}