From 7c49fcd788692a898e985cb156dd9fd910c05790 Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 4 Apr 2025 23:14:14 -0400 Subject: Add new authentication to dashboard, cleanup --- ufund-ui/src/app/components/dashboard/dashboard.component.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ufund-ui/src/app/components/dashboard/dashboard.component.ts') diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts index 9bf7627..1181608 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', @@ -55,4 +56,5 @@ export class DashboardComponent implements OnInit{ } + protected readonly userType = userType; } -- cgit v1.2.3 From 483f74a420f7aabe4ef0eeafeb668bd9f0da12be Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 4 Apr 2025 23:33:19 -0400 Subject: Remove old auth redirect code --- ufund-ui/src/app/components/dashboard/dashboard.component.ts | 6 ------ 1 file changed, 6 deletions(-) (limited to 'ufund-ui/src/app/components/dashboard/dashboard.component.ts') diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts index 1181608..2ab4db2 100644 --- a/ufund-ui/src/app/components/dashboard/dashboard.component.ts +++ b/ufund-ui/src/app/components/dashboard/dashboard.component.ts @@ -29,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 -- cgit v1.2.3