linter errors in auth.guard.ts
This commit is contained in:
parent
baf64ff4b7
commit
8807ba6cc9
1 changed files with 2 additions and 2 deletions
|
@ -8,13 +8,13 @@ export class AuthGuard implements CanActivate {
|
|||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||
if (localStorage.getItem('sessionKey')) {
|
||||
console.log('session key found')
|
||||
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')
|
||||
console.log('no session key found');
|
||||
this.router.navigate(['/login'], { queryParams: { returnUrl: state.url }});
|
||||
return false;
|
||||
}
|
||||
|
|
Reference in a new issue