diff options
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r-- | server/helpers/custom-validators/videos.ts | 7 |
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 | ||
29 | function areVideoLanguagesValid (value: number[]) { | ||
30 | return value === null || (isArray(value) && value.every(v => isVideoLanguageValid(v))) | ||
31 | } | ||
32 | |||
33 | function isVideoLanguageValid (value: number) { | 29 | function isVideoLanguageValid (value: number) { |
34 | return VIDEO_LANGUAGES[value] !== undefined | 30 | return value === null || VIDEO_LANGUAGES[value] !== undefined |
35 | } | 31 | } |
36 | 32 | ||
37 | function isVideoDurationValid (value: string) { | 33 | function 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, |