diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-15 14:46:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-15 15:29:07 +0100 |
commit | 2422c46b27790d94fd29a7092170cee5a1b56008 (patch) | |
tree | d5c1942ce20cadb27a551d87c789edfe92f5b105 /server/middlewares/validators/videos.ts | |
parent | 34cbef8c6cc912143a421413bdd832c4adcc556a (diff) | |
download | PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.gz PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.zst PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.zip |
Implement support field in video and video channel
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index 6d4fb907b..e91739f81 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -14,7 +14,7 @@ import { | |||
14 | isVideoLicenceValid, | 14 | isVideoLicenceValid, |
15 | isVideoNameValid, | 15 | isVideoNameValid, |
16 | isVideoPrivacyValid, | 16 | isVideoPrivacyValid, |
17 | isVideoRatingTypeValid, | 17 | isVideoRatingTypeValid, isVideoSupportValid, |
18 | isVideoTagsValid | 18 | isVideoTagsValid |
19 | } from '../../helpers/custom-validators/videos' | 19 | } from '../../helpers/custom-validators/videos' |
20 | import { getDurationFromVideoFile } from '../../helpers/ffmpeg-utils' | 20 | import { getDurationFromVideoFile } from '../../helpers/ffmpeg-utils' |
@@ -46,6 +46,7 @@ const videosAddValidator = [ | |||
46 | body('language').optional().custom(isVideoLanguageValid).withMessage('Should have a valid language'), | 46 | body('language').optional().custom(isVideoLanguageValid).withMessage('Should have a valid language'), |
47 | body('nsfw').custom(isBooleanValid).withMessage('Should have a valid NSFW attribute'), | 47 | body('nsfw').custom(isBooleanValid).withMessage('Should have a valid NSFW attribute'), |
48 | body('description').optional().custom(isVideoDescriptionValid).withMessage('Should have a valid description'), | 48 | body('description').optional().custom(isVideoDescriptionValid).withMessage('Should have a valid description'), |
49 | body('support').optional().custom(isVideoSupportValid).withMessage('Should have a valid support text'), | ||
49 | body('channelId').custom(isIdValid).withMessage('Should have correct video channel id'), | 50 | body('channelId').custom(isIdValid).withMessage('Should have correct video channel id'), |
50 | body('privacy').custom(isVideoPrivacyValid).withMessage('Should have correct video privacy'), | 51 | body('privacy').custom(isVideoPrivacyValid).withMessage('Should have correct video privacy'), |
51 | body('tags').optional().custom(isVideoTagsValid).withMessage('Should have correct tags'), | 52 | body('tags').optional().custom(isVideoTagsValid).withMessage('Should have correct tags'), |
@@ -116,6 +117,7 @@ const videosUpdateValidator = [ | |||
116 | body('nsfw').optional().custom(isBooleanValid).withMessage('Should have a valid NSFW attribute'), | 117 | body('nsfw').optional().custom(isBooleanValid).withMessage('Should have a valid NSFW attribute'), |
117 | body('privacy').optional().custom(isVideoPrivacyValid).withMessage('Should have correct video privacy'), | 118 | body('privacy').optional().custom(isVideoPrivacyValid).withMessage('Should have correct video privacy'), |
118 | body('description').optional().custom(isVideoDescriptionValid).withMessage('Should have a valid description'), | 119 | body('description').optional().custom(isVideoDescriptionValid).withMessage('Should have a valid description'), |
120 | body('support').optional().custom(isVideoSupportValid).withMessage('Should have a valid support text'), | ||
119 | body('tags').optional().custom(isVideoTagsValid).withMessage('Should have correct tags'), | 121 | body('tags').optional().custom(isVideoTagsValid).withMessage('Should have correct tags'), |
120 | body('commentsEnabled').optional().custom(isBooleanValid).withMessage('Should have comments enabled boolean'), | 122 | body('commentsEnabled').optional().custom(isBooleanValid).withMessage('Should have comments enabled boolean'), |
121 | 123 | ||