aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-four/main.js
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-16 16:49:43 +0100
committerChocobozzz <me@florianbigard.com>2021-12-16 16:49:43 +0100
commit2e9c7877eb3a3c5d64cc5c3383f0a7c0b51f5481 (patch)
tree9003b67f56f13267aa373e0d0314c9893ad38fb6 /server/tests/fixtures/peertube-plugin-test-four/main.js
parent2b6af10e9f37ccd104a9cc179e32c530a6655964 (diff)
downloadPeerTube-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.js7
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}