]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-channel-sync.ts
Add Podcast RSS feeds (#5487)
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-channel-sync.ts
index 081f09bba1bb586c81ef5717a0d1cd52dafeb1a2..7e5b1247177cac9d574c6e52caad858e31fd11c1 100644 (file)
@@ -1,7 +1,6 @@
 import * as express from 'express'
 import { body, param } from 'express-validator'
 import { isUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
-import { logger } from '@server/helpers/logger'
 import { CONFIG } from '@server/initializers/config'
 import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync'
 import { HttpStatusCode, VideoChannelSyncCreate } from '@shared/models'
@@ -20,12 +19,13 @@ 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),
 
-  async (req: express.Request, res: express.Response, next: express.NextFunction) => {
-    logger.debug('Checking videoChannelSync parameters', { parameters: req.body })
+  body('videoChannelId')
+    .isInt(),
 
+  async (req: express.Request, res: express.Response, next: express.NextFunction) => {
     if (areValidationErrors(req, res)) return
 
     const body: VideoChannelSyncCreate = req.body