X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Frouting%2Flogin-guard.service.ts;h=7b1c37ee8929976022d60ff1592d4ef9fcf28e58;hb=b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62;hp=40ff8f5059491177fd9695e01ec22c675aed81cc;hpb=0b4e5fe32708afce54212810738aa4d0c3dc178d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/routing/login-guard.service.ts b/client/src/app/core/routing/login-guard.service.ts index 40ff8f505..7b1c37ee8 100644 --- a/client/src/app/core/routing/login-guard.service.ts +++ b/client/src/app/core/routing/login-guard.service.ts @@ -1,11 +1,5 @@ import { Injectable } from '@angular/core' -import { - ActivatedRouteSnapshot, - CanActivateChild, - RouterStateSnapshot, - CanActivate, - Router -} from '@angular/router' +import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router' import { AuthService } from '../auth/auth.service' @@ -20,8 +14,6 @@ export class LoginGuard implements CanActivate, CanActivateChild { canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { if (this.auth.isLoggedIn() === true) return true - this.auth.redirectUrl = state.url - this.router.navigate([ '/login' ]) return false }