aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/routing/login-guard.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-24 10:40:27 +0200
committerGitHub <noreply@github.com>2018-09-24 10:40:27 +0200
commit0b4e5fe32708afce54212810738aa4d0c3dc178d (patch)
tree5d9b160e257a2bd116e67c9363b798f422ead44c /client/src/app/core/routing/login-guard.service.ts
parent23db998f07d674c621972a769df73203b14e093a (diff)
parent01448622992b12318a2fff508e501732b59dd6be (diff)
downloadPeerTube-0b4e5fe32708afce54212810738aa4d0c3dc178d.tar.gz
PeerTube-0b4e5fe32708afce54212810738aa4d0c3dc178d.tar.zst
PeerTube-0b4e5fe32708afce54212810738aa4d0c3dc178d.zip
Merge branch 'develop' into unused-imports
Diffstat (limited to 'client/src/app/core/routing/login-guard.service.ts')
-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 }