diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index d9626929c..159727e28 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' |
15 | import { | 15 | import { |
16 | checkUserCanManageVideo, | 16 | checkUserCanManageVideo, |
17 | isVideoOriginallyPublishedAtValid, | ||
17 | isScheduleVideoUpdatePrivacyValid, | 18 | isScheduleVideoUpdatePrivacyValid, |
18 | isVideoCategoryValid, | 19 | isVideoCategoryValid, |
19 | isVideoChannelOfAccountExist, | 20 | isVideoChannelOfAccountExist, |
@@ -344,7 +345,10 @@ function getCommonVideoAttributes () { | |||
344 | .optional() | 345 | .optional() |
345 | .toBoolean() | 346 | .toBoolean() |
346 | .custom(isBooleanValid).withMessage('Should have downloading enabled boolean'), | 347 | .custom(isBooleanValid).withMessage('Should have downloading enabled boolean'), |
347 | 348 | body('originallyPublishedAt') | |
349 | .optional() | ||
350 | .customSanitizer(toValueOrNull) | ||
351 | .custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'), | ||
348 | body('scheduleUpdate') | 352 | body('scheduleUpdate') |
349 | .optional() | 353 | .optional() |
350 | .customSanitizer(toValueOrNull), | 354 | .customSanitizer(toValueOrNull), |