aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-20 11:09:15 +0100
committerChocobozzz <me@florianbigard.com>2017-12-20 11:09:15 +0100
commita4b8a4ddccc926e0670d3687cccd52496f6f8a8f (patch)
treeed2d31a22e5cc7ee96f865213ee2be9845d331c5 /client
parent8fa5653ad8bebed9a1b2a649e8ea160184d52408 (diff)
downloadPeerTube-a4b8a4ddccc926e0670d3687cccd52496f6f8a8f.tar.gz
PeerTube-a4b8a4ddccc926e0670d3687cccd52496f6f8a8f.tar.zst
PeerTube-a4b8a4ddccc926e0670d3687cccd52496f6f8a8f.zip
Redirect to uuid video route after upload
Diffstat (limited to 'client')
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts
index 503f705db..90510d0dc 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -25,7 +25,10 @@ export class VideoAddComponent extends FormReactive implements OnInit {
25 isUploadingVideo = false 25 isUploadingVideo = false
26 videoUploaded = false 26 videoUploaded = false
27 videoUploadPercents = 0 27 videoUploadPercents = 0
28 videoUploadedId = 0 28 videoUploadedIds = {
29 id: 0,
30 uuid: ''
31 }
29 32
30 error: string = null 33 error: string = null
31 form: FormGroup 34 form: FormGroup
@@ -122,7 +125,7 @@ export class VideoAddComponent extends FormReactive implements OnInit {
122 125
123 this.videoUploaded = true 126 this.videoUploaded = true
124 127
125 this.videoUploadedId = event.body.video.id 128 this.videoUploadedIds = event.body.video
126 } 129 }
127 }, 130 },
128 131
@@ -142,13 +145,14 @@ export class VideoAddComponent extends FormReactive implements OnInit {
142 const video = new VideoEdit() 145 const video = new VideoEdit()
143 video.patch(this.form.value) 146 video.patch(this.form.value)
144 video.channel = this.firstStepChannelId 147 video.channel = this.firstStepChannelId
145 video.id = this.videoUploadedId 148 video.id = this.videoUploadedIds.id
149 video.uuid = this.videoUploadedIds.uuid
146 150
147 this.videoService.updateVideo(video) 151 this.videoService.updateVideo(video)
148 .subscribe( 152 .subscribe(
149 () => { 153 () => {
150 this.notificationsService.success('Success', 'Video published.') 154 this.notificationsService.success('Success', 'Video published.')
151 this.router.navigate([ '/videos/watch', video.id ]) 155 this.router.navigate([ '/videos/watch', video.uuid ])
152 }, 156 },
153 157
154 err => { 158 err => {