aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/videos.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index 051a19e16..194d12c6e 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -14,6 +14,7 @@ import {
14} from '../../../helpers/custom-validators/misc' 14} from '../../../helpers/custom-validators/misc'
15import { 15import {
16 checkUserCanManageVideo, 16 checkUserCanManageVideo,
17 isVideoOriginallyPublishedAtValid,
17 isScheduleVideoUpdatePrivacyValid, 18 isScheduleVideoUpdatePrivacyValid,
18 isVideoCategoryValid, 19 isVideoCategoryValid,
19 isVideoChannelOfAccountExist, 20 isVideoChannelOfAccountExist,
@@ -340,6 +341,10 @@ function getCommonVideoAttributes () {
340 .optional() 341 .optional()
341 .toBoolean() 342 .toBoolean()
342 .custom(isBooleanValid).withMessage('Should have comments enabled boolean'), 343 .custom(isBooleanValid).withMessage('Should have comments enabled boolean'),
344 body('originallyPublishedAt')
345 .optional()
346 .customSanitizer(toValueOrNull)
347 .custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'),
343 348
344 body('scheduleUpdate') 349 body('scheduleUpdate')
345 .optional() 350 .optional()