aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorclementbrizard <clementbrizard53@gmail.com>2019-01-12 13:45:23 +0000
committerclementbrizard <clementbrizard53@gmail.com>2019-01-12 13:45:23 +0000
commit1e74f19a2179df7fc2e0da73163ef2c3118cbecb (patch)
treed00a7b500e5ffe4973f4ce4a52b85da28733ae28 /client/src/app/shared
parentc80341655fce5e70ad6da7d812e2ddeb1f8ef7f2 (diff)
downloadPeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.tar.gz
PeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.tar.zst
PeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.zip
Enable video upload and edit
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/forms/form-validators/video-validators.service.ts6
-rw-r--r--client/src/app/shared/video-import/video-import.service.ts4
-rw-r--r--client/src/app/shared/video/video.service.ts4
3 files changed, 12 insertions, 2 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-validators.service.ts b/client/src/app/shared/forms/form-validators/video-validators.service.ts
index 81ed0666f..e3f7a0969 100644
--- a/client/src/app/shared/forms/form-validators/video-validators.service.ts
+++ b/client/src/app/shared/forms/form-validators/video-validators.service.ts
@@ -16,6 +16,7 @@ export class VideoValidatorsService {
16 readonly VIDEO_TAGS: BuildFormValidator 16 readonly VIDEO_TAGS: BuildFormValidator
17 readonly VIDEO_SUPPORT: BuildFormValidator 17 readonly VIDEO_SUPPORT: BuildFormValidator
18 readonly VIDEO_SCHEDULE_PUBLICATION_AT: BuildFormValidator 18 readonly VIDEO_SCHEDULE_PUBLICATION_AT: BuildFormValidator
19 readonly VIDEO_ORIGINALLY_PUBLISHED_AT: BuildFormValidator
19 20
20 constructor (private i18n: I18n) { 21 constructor (private i18n: I18n) {
21 22
@@ -92,5 +93,10 @@ export class VideoValidatorsService {
92 'required': this.i18n('A date is required to schedule video update.') 93 'required': this.i18n('A date is required to schedule video update.')
93 } 94 }
94 } 95 }
96
97 this.VIDEO_ORIGINALLY_PUBLISHED_AT = {
98 VALIDATORS: [ ],
99 MESSAGES: {}
100 }
95 } 101 }
96} 102}
diff --git a/client/src/app/shared/video-import/video-import.service.ts b/client/src/app/shared/video-import/video-import.service.ts
index 7ae66ddfc..11a7694c8 100644
--- a/client/src/app/shared/video-import/video-import.service.ts
+++ b/client/src/app/shared/video-import/video-import.service.ts
@@ -67,6 +67,7 @@ export class VideoImportService {
67 const description = video.description || null 67 const description = video.description || null
68 const support = video.support || null 68 const support = video.support || null
69 const scheduleUpdate = video.scheduleUpdate || null 69 const scheduleUpdate = video.scheduleUpdate || null
70 const originallyPublishedAt = video.originallyPublishedAt || null
70 71
71 return { 72 return {
72 name: video.name, 73 name: video.name,
@@ -83,7 +84,8 @@ export class VideoImportService {
83 commentsEnabled: video.commentsEnabled, 84 commentsEnabled: video.commentsEnabled,
84 thumbnailfile: video.thumbnailfile, 85 thumbnailfile: video.thumbnailfile,
85 previewfile: video.previewfile, 86 previewfile: video.previewfile,
86 scheduleUpdate 87 scheduleUpdate,
88 originallyPublishedAt
87 } 89 }
88 } 90 }
89 91
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 55844f988..5d258891f 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -81,6 +81,7 @@ export class VideoService implements VideosProvider {
81 const description = video.description || null 81 const description = video.description || null
82 const support = video.support || null 82 const support = video.support || null
83 const scheduleUpdate = video.scheduleUpdate || null 83 const scheduleUpdate = video.scheduleUpdate || null
84 const originallyPublishedAt = video.originallyPublishedAt || null
84 85
85 const body: VideoUpdate = { 86 const body: VideoUpdate = {
86 name: video.name, 87 name: video.name,
@@ -97,7 +98,8 @@ export class VideoService implements VideosProvider {
97 commentsEnabled: video.commentsEnabled, 98 commentsEnabled: video.commentsEnabled,
98 thumbnailfile: video.thumbnailfile, 99 thumbnailfile: video.thumbnailfile,
99 previewfile: video.previewfile, 100 previewfile: video.previewfile,
100 scheduleUpdate 101 scheduleUpdate,
102 originallyPublishedAt
101 } 103 }
102 104
103 const data = objectToFormData(body) 105 const data = objectToFormData(body)