aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-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 => {