aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-24 09:16:48 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:41 +0100
commit74a4d53110ebc073dafeb74a7ac815fe00f4706b (patch)
treec09797245d4ea1093b7bc7e61f925aef9e554b02 /server/tests/fixtures/peertube-plugin-test
parenteebd9838f067369031af9770b899f75f30810549 (diff)
downloadPeerTube-74a4d53110ebc073dafeb74a7ac815fe00f4706b.tar.gz
PeerTube-74a4d53110ebc073dafeb74a7ac815fe00f4706b.tar.zst
PeerTube-74a4d53110ebc073dafeb74a7ac815fe00f4706b.zip
Add server hooks for search endpoint
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index dfcc874d4..ee0bc39f3 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -230,6 +230,30 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
230 } 230 }
231 } 231 }
232 }) 232 })
233
234 {
235 const searchHooks = [
236 'filter:api.search.videos.local.list.params',
237 'filter:api.search.videos.local.list.result',
238 'filter:api.search.videos.index.list.params',
239 'filter:api.search.videos.index.list.result',
240 'filter:api.search.video-channels.local.list.params',
241 'filter:api.search.video-channels.local.list.result',
242 'filter:api.search.video-channels.index.list.params',
243 'filter:api.search.video-channels.index.list.result',
244 ]
245
246 for (const h of searchHooks) {
247 registerHook({
248 target: h,
249 handler: (obj) => {
250 peertubeHelpers.logger.debug('Run hook %s.', h)
251
252 return obj
253 }
254 })
255 }
256 }
233} 257}
234 258
235async function unregister () { 259async function unregister () {