aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared/video-edit.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/shared/video-edit.model.ts')
-rw-r--r--client/src/app/videos/shared/video-edit.model.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/src/app/videos/shared/video-edit.model.ts b/client/src/app/videos/shared/video-edit.model.ts
index f30d8feba..e0b7bf130 100644
--- a/client/src/app/videos/shared/video-edit.model.ts
+++ b/client/src/app/videos/shared/video-edit.model.ts
@@ -1,3 +1,5 @@
1import { VideoDetails } from './video-details.model'
2
1export class VideoEdit { 3export class VideoEdit {
2 category: number 4 category: number
3 licence: number 5 licence: number
@@ -10,6 +12,19 @@ export class VideoEdit {
10 uuid?: string 12 uuid?: string
11 id?: number 13 id?: number
12 14
15 constructor (videoDetails: VideoDetails) {
16 this.id = videoDetails.id
17 this.uuid = videoDetails.uuid
18 this.category = videoDetails.category
19 this.licence = videoDetails.licence
20 this.language = videoDetails.language
21 this.description = videoDetails.description
22 this.name = videoDetails.name
23 this.tags = videoDetails.tags
24 this.nsfw = videoDetails.nsfw
25 this.channel = videoDetails.channel.id
26 }
27
13 patch (values: Object) { 28 patch (values: Object) {
14 Object.keys(values).forEach((key) => { 29 Object.keys(values).forEach((key) => {
15 this[key] = values[key] 30 this[key] = values[key]