aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-edit.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/video-edit.model.ts')
-rw-r--r--client/src/app/shared/video/video-edit.model.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts
index a62277e04..fc772a3cf 100644
--- a/client/src/app/shared/video/video-edit.model.ts
+++ b/client/src/app/shared/video/video-edit.model.ts
@@ -25,7 +25,6 @@ export class VideoEdit implements VideoUpdate {
25 uuid?: string 25 uuid?: string
26 id?: number 26 id?: number
27 scheduleUpdate?: VideoScheduleUpdate 27 scheduleUpdate?: VideoScheduleUpdate
28 [key: string]: any
29 28
30 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { 29 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) {
31 if (video) { 30 if (video) {
@@ -50,14 +49,14 @@ export class VideoEdit implements VideoUpdate {
50 } 49 }
51 } 50 }
52 51
53 patch (values: any) { 52 patch (values: { [ id: string ]: string }) {
54 Object.keys(values).forEach((key) => { 53 Object.keys(values).forEach((key) => {
55 this[ key ] = values[ key ] 54 this[ key ] = values[ key ]
56 }) 55 })
57 56
58 // If schedule publication, the video is private and will be changed to public privacy 57 // If schedule publication, the video is private and will be changed to public privacy
59 if (parseInt(values['privacy'], 10) === VideoEdit.SPECIAL_SCHEDULED_PRIVACY) { 58 if (parseInt(values['privacy'], 10) === VideoEdit.SPECIAL_SCHEDULED_PRIVACY) {
60 const updateAt = (values['schedulePublicationAt'] as Date) 59 const updateAt = new Date(values['schedulePublicationAt'])
61 updateAt.setSeconds(0) 60 updateAt.setSeconds(0)
62 61
63 this.privacy = VideoPrivacy.PRIVATE 62 this.privacy = VideoPrivacy.PRIVATE