From 2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Dec 2021 16:49:43 +0100 Subject: Add videos.getFiles plugin helper --- server/tests/fixtures/peertube-plugin-test-four/main.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server/tests/fixtures/peertube-plugin-test-four') diff --git a/server/tests/fixtures/peertube-plugin-test-four/main.js b/server/tests/fixtures/peertube-plugin-test-four/main.js index b9b207b81..edbb883e2 100644 --- a/server/tests/fixtures/peertube-plugin-test-four/main.js +++ b/server/tests/fixtures/peertube-plugin-test-four/main.js @@ -104,6 +104,13 @@ async function register ({ isUser }) }) + + router.get('/video-files/:id', async (req, res) => { + const details = await peertubeHelpers.videos.getFiles(req.params.id) + if (!details) return res.sendStatus(404) + + return res.json(details) + }) } } -- cgit v1.2.3