const videoImportAddValidator = getCommonVideoEditAttributes().concat([
body('channelId')
.customSanitizer(toIntOrNull)
- .custom(isIdValid).withMessage('Should have correct video channel id'),
+ .custom(isIdValid),
body('targetUrl')
.optional()
- .custom(isVideoImportTargetUrlValid).withMessage('Should have a valid video import target URL'),
+ .custom(isVideoImportTargetUrlValid),
body('magnetUri')
.optional()
- .custom(isVideoMagnetUriValid).withMessage('Should have a valid video magnet URI'),
+ .custom(isVideoMagnetUriValid),
body('torrentfile')
.custom((value, { req }) => isVideoImportTorrentFile(req.files))
.withMessage(
const getMyVideoImportsValidator = [
query('videoChannelSyncId')
.optional()
- .custom(isIdValid).withMessage('Should have correct videoChannelSync id'),
+ .custom(isIdValid),
(req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking getMyVideoImportsValidator parameters', { parameters: req.params })
const videoImportDeleteValidator = [
param('id')
- .custom(isIdValid).withMessage('Should have correct import id'),
+ .custom(isIdValid),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking videoImportDeleteValidator parameters', { parameters: req.params })
const videoImportCancelValidator = [
param('id')
- .custom(isIdValid).withMessage('Should have correct import id'),
+ .custom(isIdValid),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking videoImportCancelValidator parameters', { parameters: req.params })