From 00494d6e2ae915741f47869dcd359d9728a0af91 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sat, 27 Jun 2020 13:12:30 +0200 Subject: allow limiting video-comments rss feeds to an account or video channel --- server/middlewares/validators/feeds.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/feeds.ts b/server/middlewares/validators/feeds.ts index f34c2b174..c3de0f5fe 100644 --- a/server/middlewares/validators/feeds.ts +++ b/server/middlewares/validators/feeds.ts @@ -70,6 +70,12 @@ const videoCommentsFeedsValidator = [ if (areValidationErrors(req, res)) return + if (req.query.videoId && (req.query.videoChannelId || req.query.videoChannelName)) { + return res.status(400).send({ + message: 'videoId cannot be mixed with a channel filter' + }).end() + } + if (req.query.videoId && !await doesVideoExist(req.query.videoId, res)) return return next() -- cgit v1.2.3