-
-const listVideoAccountChannelsValidator = [
- param('accountName').exists().withMessage('Should have a valid account name'),
-
- async (req: express.Request, res: express.Response, next: express.NextFunction) => {
- logger.debug('Checking listVideoAccountChannelsValidator parameters', { parameters: req.body })
-
- if (areValidationErrors(req, res)) return
- if (!await isAccountNameWithHostExist(req.params.accountName, res)) return
-
- return next()
- }
-]
+import { isBooleanValid } from '../../../helpers/custom-validators/misc'
+import { doesLocalVideoChannelNameExist, doesVideoChannelNameWithHostExist } from '../../../helpers/middlewares'