diff options
Diffstat (limited to '')
-rw-r--r-- | ufund-ui/src/app/components/dashboard/dashboard.component.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts index 9bf7627..2ab4db2 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.ts +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.ts @@ -5,6 +5,7 @@ import {CupboardService} from '../../services/cupboard.service'; import {UsersService} from '../../services/users.service'; import {BehaviorSubject} from 'rxjs'; import {GoalType, Need} from '../../models/Need'; +import {userType} from '../../models/User'; @Component({ selector: 'app-dashboard', @@ -28,12 +29,6 @@ export class DashboardComponent implements OnInit{ ) {} ngOnInit() { - let user = this.authService.getCurrentUser() - if(!localStorage.getItem("credential") && !user) { - this.router.navigate(['/login']) - return - } - this.userService.getCount().subscribe(count => this.count.next(count)) this.cupboardService.getNeeds().subscribe(needs => { let totalValue = 0 @@ -55,4 +50,5 @@ export class DashboardComponent implements OnInit{ } + protected readonly userType = userType; } |