aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-10 10:18:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-10 10:24:02 +0200
commitf47bf2e142b0b22460558e23720f5aed8deb982c (patch)
tree63a084494585a67e4326bf18c611e108de59aaee /client/src/app/videos
parent35bf0c83c80f59ca79f4b84fac8700f17adeb22d (diff)
downloadPeerTube-f47bf2e142b0b22460558e23720f5aed8deb982c.tar.gz
PeerTube-f47bf2e142b0b22460558e23720f5aed8deb982c.tar.zst
PeerTube-f47bf2e142b0b22460558e23720f5aed8deb982c.zip
Client: check user is logged in for some pages
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-edit/video-add-routing.module.ts3
-rw-r--r--client/src/app/videos/+video-edit/video-update-routing.module.ts3
-rw-r--r--client/src/app/videos/+video-watch/video-watch-routing.module.ts2
-rw-r--r--client/src/app/videos/videos-routing.module.ts4
4 files changed, 7 insertions, 5 deletions
diff --git a/client/src/app/videos/+video-edit/video-add-routing.module.ts b/client/src/app/videos/+video-edit/video-add-routing.module.ts
index 9e8fa4acc..e7a32627c 100644
--- a/client/src/app/videos/+video-edit/video-add-routing.module.ts
+++ b/client/src/app/videos/+video-edit/video-add-routing.module.ts
@@ -3,13 +3,14 @@ import { RouterModule, Routes } from '@angular/router'
3 3
4import { MetaGuard } from '@ngx-meta/core' 4import { MetaGuard } from '@ngx-meta/core'
5 5
6import { LoginGuard } from '../../core'
6import { VideoAddComponent } from './video-add.component' 7import { VideoAddComponent } from './video-add.component'
7 8
8const videoAddRoutes: Routes = [ 9const videoAddRoutes: Routes = [
9 { 10 {
10 path: '', 11 path: '',
11 component: VideoAddComponent, 12 component: VideoAddComponent,
12 canActivateChild: [ MetaGuard ] 13 canActivate: [ MetaGuard, LoginGuard ]
13 } 14 }
14] 15]
15 16
diff --git a/client/src/app/videos/+video-edit/video-update-routing.module.ts b/client/src/app/videos/+video-edit/video-update-routing.module.ts
index 1d06a7ac3..22c27a072 100644
--- a/client/src/app/videos/+video-edit/video-update-routing.module.ts
+++ b/client/src/app/videos/+video-edit/video-update-routing.module.ts
@@ -3,13 +3,14 @@ import { RouterModule, Routes } from '@angular/router'
3 3
4import { MetaGuard } from '@ngx-meta/core' 4import { MetaGuard } from '@ngx-meta/core'
5 5
6import { LoginGuard } from '../../core'
6import { VideoUpdateComponent } from './video-update.component' 7import { VideoUpdateComponent } from './video-update.component'
7 8
8const videoUpdateRoutes: Routes = [ 9const videoUpdateRoutes: Routes = [
9 { 10 {
10 path: '', 11 path: '',
11 component: VideoUpdateComponent, 12 component: VideoUpdateComponent,
12 canActivateChild: [ MetaGuard ] 13 canActivate: [ MetaGuard, LoginGuard ]
13 } 14 }
14] 15]
15 16
diff --git a/client/src/app/videos/+video-watch/video-watch-routing.module.ts b/client/src/app/videos/+video-watch/video-watch-routing.module.ts
index 97fa5c725..bdd4f945e 100644
--- a/client/src/app/videos/+video-watch/video-watch-routing.module.ts
+++ b/client/src/app/videos/+video-watch/video-watch-routing.module.ts
@@ -9,7 +9,7 @@ const videoWatchRoutes: Routes = [
9 { 9 {
10 path: '', 10 path: '',
11 component: VideoWatchComponent, 11 component: VideoWatchComponent,
12 canActivateChild: [ MetaGuard ] 12 canActivate: [ MetaGuard ]
13 } 13 }
14] 14]
15 15
diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts
index 225b6b018..d3869748b 100644
--- a/client/src/app/videos/videos-routing.module.ts
+++ b/client/src/app/videos/videos-routing.module.ts
@@ -22,11 +22,11 @@ const videosRoutes: Routes = [
22 } 22 }
23 }, 23 },
24 { 24 {
25 path: 'add', 25 path: 'upload',
26 loadChildren: 'app/videos/+video-edit#VideoAddModule', 26 loadChildren: 'app/videos/+video-edit#VideoAddModule',
27 data: { 27 data: {
28 meta: { 28 meta: {
29 title: 'Add a video' 29 title: 'Upload a video'
30 } 30 }
31 } 31 }
32 }, 32 },