diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-16 16:49:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-16 16:49:43 +0100 |
commit | 2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481 (patch) | |
tree | 9003b67f56f13267aa373e0d0314c9893ad38fb6 /server/tests/fixtures/peertube-plugin-test-four/main.js | |
parent | 2b6af10e9f37ccd104a9cc179e32c530a6655964 (diff) | |
download | PeerTube-2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481.tar.gz PeerTube-2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481.tar.zst PeerTube-2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481.zip |
Add videos.getFiles plugin helper
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-four/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-four/main.js | 7 |
1 files changed, 7 insertions, 0 deletions
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 ({ | |||
104 | isUser | 104 | isUser |
105 | }) | 105 | }) |
106 | }) | 106 | }) |
107 | |||
108 | router.get('/video-files/:id', async (req, res) => { | ||
109 | const details = await peertubeHelpers.videos.getFiles(req.params.id) | ||
110 | if (!details) return res.sendStatus(404) | ||
111 | |||
112 | return res.json(details) | ||
113 | }) | ||
107 | } | 114 | } |
108 | 115 | ||
109 | } | 116 | } |