diff options
author | Wicklow <wicklow@framasoft.org> | 2023-02-24 16:21:26 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-02-25 15:47:48 +0100 |
commit | c0687c91b9cf185c36e477ab30266c779f792ee1 (patch) | |
tree | 5c917b6b87b38eb89620ed21b114ac67c96a71d9 /server/tests/fixtures/peertube-plugin-test | |
parent | d41f4a6dc69d098e9dc9173b7e1a586695ef7b97 (diff) | |
download | PeerTube-c0687c91b9cf185c36e477ab30266c779f792ee1.tar.gz PeerTube-c0687c91b9cf185c36e477ab30266c779f792ee1.tar.zst PeerTube-c0687c91b9cf185c36e477ab30266c779f792ee1.zip |
Add server hooks for listing subscription
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index 5b4d34f15..8b918b634 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -90,6 +90,16 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
90 | }) | 90 | }) |
91 | 91 | ||
92 | registerHook({ | 92 | registerHook({ |
93 | target: 'filter:api.user.me.subscription-videos.list.params', | ||
94 | handler: obj => Object.assign({}, obj, { count: 1 }) | ||
95 | }) | ||
96 | |||
97 | registerHook({ | ||
98 | target: 'filter:api.user.me.subscription-videos.list.result', | ||
99 | handler: obj => addToTotal(obj, 4) | ||
100 | }) | ||
101 | |||
102 | registerHook({ | ||
93 | target: 'filter:api.video.get.result', | 103 | target: 'filter:api.video.get.result', |
94 | handler: video => { | 104 | handler: video => { |
95 | video.name += ' <3' | 105 | video.name += ' <3' |