diff --git a/src/app/_guards/auth.guard.ts b/src/app/_guards/auth.guard.ts index d267cf4..6b8cd27 100644 --- a/src/app/_guards/auth.guard.ts +++ b/src/app/_guards/auth.guard.ts @@ -8,13 +8,11 @@ export class AuthGuard implements CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { if (localStorage.getItem('sessionKey')) { - console.log('session key found'); // logged in so return true return true; } // not logged in so redirect to login page with the return url - console.log('no session key found'); this.router.navigate(['/login'], { queryParams: { returnUrl: state.url }}); return false; } diff --git a/src/app/_guards/customer.guard.ts b/src/app/_guards/customer.guard.ts index 93687c1..1e34c5f 100644 --- a/src/app/_guards/customer.guard.ts +++ b/src/app/_guards/customer.guard.ts @@ -8,11 +8,9 @@ export class CustomerGuard implements CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { if (localStorage.getItem('usertype') === 'customer') { - console.log('Customer logged in'); // customer logged in so return true return true; } else if (localStorage.getItem('usertype') === 'organisation') { - console.log('not an customer'); this.router.navigate(['/dashboard']); return false; } diff --git a/src/app/_guards/org.guard.ts b/src/app/_guards/org.guard.ts index 0205b47..9954c93 100644 --- a/src/app/_guards/org.guard.ts +++ b/src/app/_guards/org.guard.ts @@ -8,11 +8,9 @@ export class OrgGuard implements CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { if (localStorage.getItem('usertype') === 'organisation') { - console.log('Organisation logged in'); // org logged in so return true return true; } else if (localStorage.getItem('usertype') === 'customer') { - console.log('not an organisation'); this.router.navigate(['/dashboard-customer']); return false; }