X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fvideos%2Fvideo-channel-sync.ts;h=18d8d74d204ce40ed8fd1e0c5485e994c90495e0;hb=396f6f0140b0f76162e2378fd5a61e2f888673ed;hp=081f09bba1bb586c81ef5717a0d1cd52dafeb1a2;hpb=97eba003a9d0adcb0cab9190f566327b1417c7d3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/videos/video-channel-sync.ts b/server/middlewares/validators/videos/video-channel-sync.ts index 081f09bba..18d8d74d2 100644 --- a/server/middlewares/validators/videos/video-channel-sync.ts +++ b/server/middlewares/validators/videos/video-channel-sync.ts @@ -20,8 +20,11 @@ export const ensureSyncIsEnabled = (req: express.Request, res: express.Response, } export const videoChannelSyncValidator = [ - body('externalChannelUrl').custom(isUrlValid).withMessage('Should have a valid channel url'), - body('videoChannelId').isInt().withMessage('Should have a valid video channel id'), + body('externalChannelUrl') + .custom(isUrlValid), + + body('videoChannelId') + .isInt(), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking videoChannelSync parameters', { parameters: req.body })