From 47524ef91f867a2f1f735c33b0b6b86c5579ef4e Mon Sep 17 00:00:00 2001 From: piratefinn Date: Mon, 21 May 2018 15:39:43 +0100 Subject: [PATCH] extraneous login console logs removed --- src/app/_guards/auth.guard.ts | 2 -- src/app/_guards/customer.guard.ts | 2 -- src/app/_guards/org.guard.ts | 2 -- 3 files changed, 6 deletions(-) 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; }