aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-19 12:36:41 +0100
committerChocobozzz <me@florianbigard.com>2018-03-19 14:20:04 +0100
commit5d00a3d7aa4309f1da5ac7d6e3ed63181eb34952 (patch)
tree924c46daaac9ef56108d8c449f934b6de344ae72 /server/helpers/custom-validators/videos.ts
parent09700934b90e2ac7b1b9ed1694d9d4d52735e2e1 (diff)
downloadPeerTube-5d00a3d7aa4309f1da5ac7d6e3ed63181eb34952.tar.gz
PeerTube-5d00a3d7aa4309f1da5ac7d6e3ed63181eb34952.tar.zst
PeerTube-5d00a3d7aa4309f1da5ac7d6e3ed63181eb34952.zip
Update the api documentation
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index c08ddd24e..a46d715ba 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -26,12 +26,8 @@ function isVideoLicenceValid (value: number) {
26 return value === null || VIDEO_LICENCES[value] !== undefined 26 return value === null || VIDEO_LICENCES[value] !== undefined
27} 27}
28 28
29function areVideoLanguagesValid (value: number[]) {
30 return value === null || (isArray(value) && value.every(v => isVideoLanguageValid(v)))
31}
32
33function isVideoLanguageValid (value: number) { 29function isVideoLanguageValid (value: number) {
34 return VIDEO_LANGUAGES[value] !== undefined 30 return value === null || VIDEO_LANGUAGES[value] !== undefined
35} 31}
36 32
37function isVideoDurationValid (value: string) { 33function isVideoDurationValid (value: string) {
@@ -137,7 +133,6 @@ export {
137 isVideoDescriptionValid, 133 isVideoDescriptionValid,
138 isVideoFileInfoHashValid, 134 isVideoFileInfoHashValid,
139 isVideoNameValid, 135 isVideoNameValid,
140 areVideoLanguagesValid,
141 isVideoTagsValid, 136 isVideoTagsValid,
142 isVideoAbuseReasonValid, 137 isVideoAbuseReasonValid,
143 isVideoFile, 138 isVideoFile,