if (areValidationErrors(req, res)) return
if (!await doesVideoExist(req.params.videoId, res)) return
- if (!await doesVideoBlacklistExist(res.locals.video.id, res)) return
+ if (!await doesVideoBlacklistExist(res.locals.videoAll.id, res)) return
return next()
}
if (areValidationErrors(req, res)) return
if (!await doesVideoExist(req.params.videoId, res)) return
- const video = res.locals.video
+ const video = res.locals.videoAll
if (req.body.unfederate === true && video.remote === true) {
return res
.status(409)
if (areValidationErrors(req, res)) return
if (!await doesVideoExist(req.params.videoId, res)) return
- if (!await doesVideoBlacklistExist(res.locals.video.id, res)) return
+ if (!await doesVideoBlacklistExist(res.locals.videoAll.id, res)) return
return next()
}
query('type')
.optional()
.custom(isVideoBlacklistTypeValid).withMessage('Should have a valid video blacklist type attribute'),
+ query('search')
+ .optional()
+ .not()
+ .isEmpty().withMessage('Should have a valid search'),
(req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking videos blacklist filters query', { parameters: req.query })