diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-27 20:53:11 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-27 20:53:11 +0200 |
commit | 6f0c39e2de400685b7baf8340b9e132f2659365a (patch) | |
tree | b036c6ebf65ff4cb7f5649fc48a0b7201370bddd /server/helpers/custom-validators/videos.js | |
parent | 28974889281523eec5b00dd5596c67d99c5167e5 (diff) | |
download | PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.gz PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.zst PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.zip |
Server: add licence video 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 efa89c427..8495e9665 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -14,6 +14,7 @@ const videosValidators = { | |||
14 | isVideoAuthorValid, | 14 | isVideoAuthorValid, |
15 | isVideoDateValid, | 15 | isVideoDateValid, |
16 | isVideoCategoryValid, | 16 | isVideoCategoryValid, |
17 | isVideoLicenceValid, | ||
17 | isVideoDescriptionValid, | 18 | isVideoDescriptionValid, |
18 | isVideoDurationValid, | 19 | isVideoDurationValid, |
19 | isVideoInfoHashValid, | 20 | isVideoInfoHashValid, |
@@ -45,6 +46,10 @@ function isVideoCategoryValid (value) { | |||
45 | return constants.VIDEO_CATEGORIES[value] !== undefined | 46 | return constants.VIDEO_CATEGORIES[value] !== undefined |
46 | } | 47 | } |
47 | 48 | ||
49 | function isVideoLicenceValid (value) { | ||
50 | return constants.VIDEO_LICENCES[value] !== undefined | ||
51 | } | ||
52 | |||
48 | function isVideoDescriptionValid (value) { | 53 | function isVideoDescriptionValid (value) { |
49 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) | 54 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) |
50 | } | 55 | } |