aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r--server/middlewares/validators/videos/videos.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index 194d12c6e..159727e28 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -341,11 +341,14 @@ function getCommonVideoAttributes () {
341 .optional() 341 .optional()
342 .toBoolean() 342 .toBoolean()
343 .custom(isBooleanValid).withMessage('Should have comments enabled boolean'), 343 .custom(isBooleanValid).withMessage('Should have comments enabled boolean'),
344 body('originallyPublishedAt') 344 body('downloadEnabled')
345 .optional() 345 .optional()
346 .customSanitizer(toValueOrNull) 346 .toBoolean()
347 .custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'), 347 .custom(isBooleanValid).withMessage('Should have downloading enabled boolean'),
348 348 body('originallyPublishedAt')
349 .optional()
350 .customSanitizer(toValueOrNull)
351 .custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'),
349 body('scheduleUpdate') 352 body('scheduleUpdate')
350 .optional() 353 .optional()
351 .customSanitizer(toValueOrNull), 354 .customSanitizer(toValueOrNull),