diff options
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index db405ff31..90951d611 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -13,6 +13,9 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
13 | 'action:api.video-comment-reply.created', | 13 | 'action:api.video-comment-reply.created', |
14 | 'action:api.video-comment.deleted', | 14 | 'action:api.video-comment.deleted', |
15 | 15 | ||
16 | 'action:api.video-caption.created', | ||
17 | 'action:api.video-caption.deleted', | ||
18 | |||
16 | 'action:api.user.blocked', | 19 | 'action:api.user.blocked', |
17 | 'action:api.user.unblocked', | 20 | 'action:api.user.unblocked', |
18 | 'action:api.user.registered', | 21 | 'action:api.user.registered', |
@@ -233,6 +236,28 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
233 | } | 236 | } |
234 | }) | 237 | }) |
235 | 238 | ||
239 | registerHook({ | ||
240 | target: 'filter:api.server.stats.get.result', | ||
241 | handler: (result) => { | ||
242 | return { ...result, customStats: 14 } | ||
243 | } | ||
244 | }) | ||
245 | |||
246 | // Upload/import/live attributes | ||
247 | for (const target of [ | ||
248 | 'filter:api.video.upload.video-attribute.result', | ||
249 | 'filter:api.video.import-url.video-attribute.result', | ||
250 | 'filter:api.video.import-torrent.video-attribute.result', | ||
251 | 'filter:api.video.live.video-attribute.result' | ||
252 | ]) { | ||
253 | registerHook({ | ||
254 | target, | ||
255 | handler: (result) => { | ||
256 | return { ...result, description: result.description + ' - ' + target } | ||
257 | } | ||
258 | }) | ||
259 | } | ||
260 | |||
236 | { | 261 | { |
237 | const filterHooks = [ | 262 | const filterHooks = [ |
238 | 'filter:api.search.videos.local.list.params', | 263 | 'filter:api.search.videos.local.list.params', |