diff options
Diffstat (limited to 'client/src/app/shared/video/video-edit.model.ts')
-rw-r--r-- | client/src/app/shared/video/video-edit.model.ts | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 88d23a59f..955255bfa 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts | |||
@@ -14,18 +14,20 @@ export class VideoEdit { | |||
14 | uuid?: string | 14 | uuid?: string |
15 | id?: number | 15 | id?: number |
16 | 16 | ||
17 | constructor (videoDetails: VideoDetails) { | 17 | constructor (videoDetails?: VideoDetails) { |
18 | this.id = videoDetails.id | 18 | if (videoDetails) { |
19 | this.uuid = videoDetails.uuid | 19 | this.id = videoDetails.id |
20 | this.category = videoDetails.category | 20 | this.uuid = videoDetails.uuid |
21 | this.licence = videoDetails.licence | 21 | this.category = videoDetails.category |
22 | this.language = videoDetails.language | 22 | this.licence = videoDetails.licence |
23 | this.description = videoDetails.description | 23 | this.language = videoDetails.language |
24 | this.name = videoDetails.name | 24 | this.description = videoDetails.description |
25 | this.tags = videoDetails.tags | 25 | this.name = videoDetails.name |
26 | this.nsfw = videoDetails.nsfw | 26 | this.tags = videoDetails.tags |
27 | this.channel = videoDetails.channel.id | 27 | this.nsfw = videoDetails.nsfw |
28 | this.privacy = videoDetails.privacy | 28 | this.channel = videoDetails.channel.id |
29 | this.privacy = videoDetails.privacy | ||
30 | } | ||
29 | } | 31 | } |
30 | 32 | ||
31 | patch (values: Object) { | 33 | patch (values: Object) { |