mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Redirect to uuid video route after upload
This commit is contained in:
parent
8fa5653ad8
commit
a4b8a4ddcc
@ -25,7 +25,10 @@ export class VideoAddComponent extends FormReactive implements OnInit {
|
|||||||
isUploadingVideo = false
|
isUploadingVideo = false
|
||||||
videoUploaded = false
|
videoUploaded = false
|
||||||
videoUploadPercents = 0
|
videoUploadPercents = 0
|
||||||
videoUploadedId = 0
|
videoUploadedIds = {
|
||||||
|
id: 0,
|
||||||
|
uuid: ''
|
||||||
|
}
|
||||||
|
|
||||||
error: string = null
|
error: string = null
|
||||||
form: FormGroup
|
form: FormGroup
|
||||||
@ -122,7 +125,7 @@ export class VideoAddComponent extends FormReactive implements OnInit {
|
|||||||
|
|
||||||
this.videoUploaded = true
|
this.videoUploaded = true
|
||||||
|
|
||||||
this.videoUploadedId = event.body.video.id
|
this.videoUploadedIds = event.body.video
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -142,13 +145,14 @@ export class VideoAddComponent extends FormReactive implements OnInit {
|
|||||||
const video = new VideoEdit()
|
const video = new VideoEdit()
|
||||||
video.patch(this.form.value)
|
video.patch(this.form.value)
|
||||||
video.channel = this.firstStepChannelId
|
video.channel = this.firstStepChannelId
|
||||||
video.id = this.videoUploadedId
|
video.id = this.videoUploadedIds.id
|
||||||
|
video.uuid = this.videoUploadedIds.uuid
|
||||||
|
|
||||||
this.videoService.updateVideo(video)
|
this.videoService.updateVideo(video)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
() => {
|
() => {
|
||||||
this.notificationsService.success('Success', 'Video published.')
|
this.notificationsService.success('Success', 'Video published.')
|
||||||
this.router.navigate([ '/videos/watch', video.id ])
|
this.router.navigate([ '/videos/watch', video.uuid ])
|
||||||
},
|
},
|
||||||
|
|
||||||
err => {
|
err => {
|
||||||
|
Loading…
Reference in New Issue
Block a user