aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-27 13:12:30 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-06-27 13:20:59 +0200
commit00494d6e2ae915741f47869dcd359d9728a0af91 (patch)
tree9642f3d5bf1565d3b8d60d3ad06495fefce80c23 /server/middlewares
parent2c318664305fd2723586ad939e64f958d9d447ff (diff)
downloadPeerTube-00494d6e2ae915741f47869dcd359d9728a0af91.tar.gz
PeerTube-00494d6e2ae915741f47869dcd359d9728a0af91.tar.zst
PeerTube-00494d6e2ae915741f47869dcd359d9728a0af91.zip
allow limiting video-comments rss feeds to an account or video channel
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/feeds.ts6
1 files changed, 6 insertions, 0 deletions
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 = [
70 70
71 if (areValidationErrors(req, res)) return 71 if (areValidationErrors(req, res)) return
72 72
73 if (req.query.videoId && (req.query.videoChannelId || req.query.videoChannelName)) {
74 return res.status(400).send({
75 message: 'videoId cannot be mixed with a channel filter'
76 }).end()
77 }
78
73 if (req.query.videoId && !await doesVideoExist(req.query.videoId, res)) return 79 if (req.query.videoId && !await doesVideoExist(req.query.videoId, res)) return
74 80
75 return next() 81 return next()