aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-08 08:39:15 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-08 09:57:29 +0100
commitcadb46d832724ea1a17b085b992142aa32e212be (patch)
treedf1972470ab022e95ff5dc7866c78174c36bfa37 /client/src/app/shared/video
parentc182778e26b8478fae9d7dd0bf0687baf7b72fd1 (diff)
downloadPeerTube-cadb46d832724ea1a17b085b992142aa32e212be.tar.gz
PeerTube-cadb46d832724ea1a17b085b992142aa32e212be.tar.zst
PeerTube-cadb46d832724ea1a17b085b992142aa32e212be.zip
Design second video upload step
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/video-edit.model.ts26
-rw-r--r--client/src/app/shared/video/video.service.ts11
2 files changed, 21 insertions, 16 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) {
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 3f35b67c4..1a0644c3d 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -42,14 +42,17 @@ export class VideoService {
42 } 42 }
43 43
44 updateVideo (video: VideoEdit) { 44 updateVideo (video: VideoEdit) {
45 const language = video.language ? video.language : null 45 const language = video.language || undefined
46 const licence = video.licence || undefined
47 const category = video.category || undefined
48 const description = video.description || undefined
46 49
47 const body: VideoUpdate = { 50 const body: VideoUpdate = {
48 name: video.name, 51 name: video.name,
49 category: video.category, 52 category,
50 licence: video.licence, 53 licence,
51 language, 54 language,
52 description: video.description, 55 description,
53 privacy: video.privacy, 56 privacy: video.privacy,
54 tags: video.tags, 57 tags: video.tags,
55 nsfw: video.nsfw 58 nsfw: video.nsfw