aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r--server/middlewares/validators/videos.ts4
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'
20import { getDurationFromVideoFile } from '../../helpers/ffmpeg-utils' 20import { 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