From 404b54e14f6623c1644a8c87ca22f4bab98d5484 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Oct 2017 16:43:19 +0200 Subject: Adapt client with video channels --- client/src/app/videos/shared/video-edit.model.ts | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 client/src/app/videos/shared/video-edit.model.ts (limited to 'client/src/app/videos/shared/video-edit.model.ts') diff --git a/client/src/app/videos/shared/video-edit.model.ts b/client/src/app/videos/shared/video-edit.model.ts new file mode 100644 index 000000000..f30d8feba --- /dev/null +++ b/client/src/app/videos/shared/video-edit.model.ts @@ -0,0 +1,31 @@ +export class VideoEdit { + category: number + licence: number + language: number + description: string + name: string + tags: string[] + nsfw: boolean + channel: number + uuid?: string + id?: number + + patch (values: Object) { + Object.keys(values).forEach((key) => { + this[key] = values[key] + }) + } + + toJSON () { + return { + category: this.category, + licence: this.licence, + language: this.language, + description: this.description, + name: this.name, + tags: this.tags, + nsfw: this.nsfw, + channel: this.channel + } + } +} -- cgit v1.2.3