aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorclementbrizard <clementbrizard53@gmail.com>2019-01-12 13:45:23 +0000
committerclementbrizard <clementbrizard53@gmail.com>2019-01-12 13:45:23 +0000
commit1e74f19a2179df7fc2e0da73163ef2c3118cbecb (patch)
treed00a7b500e5ffe4973f4ce4a52b85da28733ae28 /server/middlewares
parentc80341655fce5e70ad6da7d812e2ddeb1f8ef7f2 (diff)
downloadPeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.tar.gz
PeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.tar.zst
PeerTube-1e74f19a2179df7fc2e0da73163ef2c3118cbecb.zip
Enable video upload and edit
Diffstat (limited to 'server/middlewares')
-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()