]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/routing/login-guard.service.ts
Merge branch 'develop' into unused-imports
[github/Chocobozzz/PeerTube.git] / client / src / app / core / routing / login-guard.service.ts
index 18bc41ca6301e9e8811f851dbd3c7cf256b33356..40ff8f5059491177fd9695e01ec22c675aed81cc 100644 (file)
@@ -20,6 +20,8 @@ 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
   }