diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-07 12:13:37 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-07 12:13:37 +0200 |
commit | 3092476e64d09b449b4ad4f5198024afec1b22ca (patch) | |
tree | f2d2bd33578e122188cd2297f60e12813bffdbb7 /server/helpers/custom-validators/videos.js | |
parent | 023553a2bde74c5765b5ea679fc04128c27f18a0 (diff) | |
download | PeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.tar.gz PeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.tar.zst PeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.zip |
Server: add video language attribute
Diffstat (limited to 'server/helpers/custom-validators/videos.js')
-rw-r--r-- | server/helpers/custom-validators/videos.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js index d0b08e7ac..8dabb828d 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -15,6 +15,7 @@ const videosValidators = { | |||
15 | isVideoDateValid, | 15 | isVideoDateValid, |
16 | isVideoCategoryValid, | 16 | isVideoCategoryValid, |
17 | isVideoLicenceValid, | 17 | isVideoLicenceValid, |
18 | isVideoLanguageValid, | ||
18 | isVideoNSFWValid, | 19 | isVideoNSFWValid, |
19 | isVideoDescriptionValid, | 20 | isVideoDescriptionValid, |
20 | isVideoDurationValid, | 21 | isVideoDurationValid, |
@@ -51,6 +52,10 @@ function isVideoLicenceValid (value) { | |||
51 | return constants.VIDEO_LICENCES[value] !== undefined | 52 | return constants.VIDEO_LICENCES[value] !== undefined |
52 | } | 53 | } |
53 | 54 | ||
55 | function isVideoLanguageValid (value) { | ||
56 | return constants.VIDEO_LANGUAGES[value] !== undefined | ||
57 | } | ||
58 | |||
54 | function isVideoNSFWValid (value) { | 59 | function isVideoNSFWValid (value) { |
55 | return validator.isBoolean(value) | 60 | return validator.isBoolean(value) |
56 | } | 61 | } |