aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/routing
diff options
context:
space:
mode:
authorBO41 <lukasw41@gmail.com>2018-09-23 16:37:48 +0200
committerRigel Kent <par@rigelk.eu>2018-09-23 16:37:48 +0200
commitec769c89fdcbcaf2d15de8d211d3ede3b6f69c1a (patch)
tree76ae11169ee75db87324a921f05572601f733196 /client/src/app/core/routing
parent923406990334d133a49a283629322d1bbb521ecc (diff)
downloadPeerTube-ec769c89fdcbcaf2d15de8d211d3ede3b6f69c1a.tar.gz
PeerTube-ec769c89fdcbcaf2d15de8d211d3ede3b6f69c1a.tar.zst
PeerTube-ec769c89fdcbcaf2d15de8d211d3ede3b6f69c1a.zip
add redirect after login (#1110)
Diffstat (limited to 'client/src/app/core/routing')
-rw-r--r--client/src/app/core/routing/login-guard.service.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/src/app/core/routing/login-guard.service.ts b/client/src/app/core/routing/login-guard.service.ts
index 18bc41ca6..40ff8f505 100644
--- a/client/src/app/core/routing/login-guard.service.ts
+++ b/client/src/app/core/routing/login-guard.service.ts
@@ -20,6 +20,8 @@ export class LoginGuard implements CanActivate, CanActivateChild {
20 canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { 20 canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
21 if (this.auth.isLoggedIn() === true) return true 21 if (this.auth.isLoggedIn() === true) return true
22 22
23 this.auth.redirectUrl = state.url
24
23 this.router.navigate([ '/login' ]) 25 this.router.navigate([ '/login' ])
24 return false 26 return false
25 } 27 }