diff options
Diffstat (limited to 'client/src/app/shared/shared-main/video')
-rw-r--r-- | client/src/app/shared/shared-main/video/video-edit.model.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts index 91d57cb6b..47eee80d8 100644 --- a/client/src/app/shared/shared-main/video/video-edit.model.ts +++ b/client/src/app/shared/shared-main/video/video-edit.model.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl } from '@app/helpers' |
2 | import { VideoPrivacy, VideoScheduleUpdate, VideoUpdate } from '@shared/models' | 2 | import { VideoPrivacy, VideoScheduleUpdate, VideoUpdate } from '@shared/models' |
3 | import { VideoDetails } from './video-details.model' | 3 | import { VideoDetails } from './video-details.model' |
4 | import { objectKeysTyped } from '@shared/core-utils' | ||
4 | 5 | ||
5 | export class VideoEdit implements VideoUpdate { | 6 | export class VideoEdit implements VideoUpdate { |
6 | static readonly SPECIAL_SCHEDULED_PRIVACY = -1 | 7 | static readonly SPECIAL_SCHEDULED_PRIVACY = -1 |
@@ -65,8 +66,9 @@ export class VideoEdit implements VideoUpdate { | |||
65 | } | 66 | } |
66 | 67 | ||
67 | patch (values: { [ id: string ]: any }) { | 68 | patch (values: { [ id: string ]: any }) { |
68 | Object.keys(values).forEach((key) => { | 69 | objectKeysTyped(values).forEach(key => { |
69 | this[key] = values[key] | 70 | // FIXME: typings |
71 | (this as any)[key] = values[key] | ||
70 | }) | 72 | }) |
71 | 73 | ||
72 | // If schedule publication, the video is private and will be changed to public privacy | 74 | // If schedule publication, the video is private and will be changed to public privacy |