-const videoChannelsUpdateValidator = [
- param('nameWithHost').exists().withMessage('Should have an video channel name with host'),
- body('displayName').optional().custom(isVideoChannelNameValid).withMessage('Should have a valid display name'),
- body('description').optional().custom(isVideoChannelDescriptionValid).withMessage('Should have a valid description'),
- body('support').optional().custom(isVideoChannelSupportValid).withMessage('Should have a valid support text'),
-
- async (req: express.Request, res: express.Response, next: express.NextFunction) => {
- logger.debug('Checking videoChannelsUpdate parameters', { parameters: req.body })
-
+export const videoChannelsUpdateValidator = [
+ param('nameWithHost')
+ .exists(),
+
+ body('displayName')
+ .optional()
+ .custom(isVideoChannelDisplayNameValid),
+ body('description')
+ .optional()
+ .custom(isVideoChannelDescriptionValid),
+ body('support')
+ .optional()
+ .custom(isVideoChannelSupportValid),
+ body('bulkVideosSupportUpdate')
+ .optional()
+ .custom(isBooleanValid).withMessage('Should have a valid bulkVideosSupportUpdate boolean field'),
+
+ (req: express.Request, res: express.Response, next: express.NextFunction) => {