From 1e74f19a2179df7fc2e0da73163ef2c3118cbecb Mon Sep 17 00:00:00 2001 From: clementbrizard Date: Sat, 12 Jan 2019 13:45:23 +0000 Subject: Enable video upload and edit --- server/middlewares/validators/videos/videos.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/middlewares') 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 { } from '../../../helpers/custom-validators/misc' import { checkUserCanManageVideo, + isVideoOriginallyPublishedAtValid, isScheduleVideoUpdatePrivacyValid, isVideoCategoryValid, isVideoChannelOfAccountExist, @@ -340,6 +341,10 @@ function getCommonVideoAttributes () { .optional() .toBoolean() .custom(isBooleanValid).withMessage('Should have comments enabled boolean'), + body('originallyPublishedAt') + .optional() + .customSanitizer(toValueOrNull) + .custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'), body('scheduleUpdate') .optional() -- cgit v1.2.3