From 2d3645843c92564ab0f55babd8e67cf0314f6f0d Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Fri, 11 Oct 2019 17:08:20 +0300 Subject: [PATCH] refactor(core): remove unnecessary injected service --- npm/ng-packs/packages/core/src/lib/guards/auth.guard.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/guards/auth.guard.ts b/npm/ng-packs/packages/core/src/lib/guards/auth.guard.ts index 5ef01db246..cbd59fb5df 100644 --- a/npm/ng-packs/packages/core/src/lib/guards/auth.guard.ts +++ b/npm/ng-packs/packages/core/src/lib/guards/auth.guard.ts @@ -1,15 +1,13 @@ import { Injectable } from '@angular/core'; -import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree, Router } from '@angular/router'; -import { Store } from '@ngxs/store'; +import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router'; import { OAuthService } from 'angular-oauth2-oidc'; import { Observable } from 'rxjs'; -import { Navigate } from '@ngxs/router-plugin'; @Injectable({ providedIn: 'root', }) export class AuthGuard implements CanActivate { - constructor(private oauthService: OAuthService, private store: Store, private router: Router) {} + constructor(private oauthService: OAuthService, private router: Router) {} canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean | UrlTree { const hasValidAccessToken = this.oauthService.hasValidAccessToken();