aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test/main.js')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index c395ac7aa..8d7584eba 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -7,6 +7,10 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
7 'action:api.video.uploaded', 7 'action:api.video.uploaded',
8 'action:api.video.viewed', 8 'action:api.video.viewed',
9 9
10 'action:api.video-channel.created',
11 'action:api.video-channel.updated',
12 'action:api.video-channel.deleted',
13
10 'action:api.live-video.created', 14 'action:api.live-video.created',
11 15
12 'action:api.video-thread.created', 16 'action:api.video-thread.created',
@@ -93,6 +97,29 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
93 } 97 }
94 }) 98 })
95 99
100 // ---------------------------------------------------------------------------
101
102 registerHook({
103 target: 'filter:api.video-channels.list.params',
104 handler: obj => addToCount(obj, 1)
105 })
106
107 registerHook({
108 target: 'filter:api.video-channels.list.result',
109 handler: obj => addToTotal(obj, 1)
110 })
111
112 registerHook({
113 target: 'filter:api.video-channel.get.result',
114 handler: channel => {
115 channel.name += ' <3'
116
117 return channel
118 }
119 })
120
121 // ---------------------------------------------------------------------------
122
96 for (const hook of [ 'filter:api.video.upload.accept.result', 'filter:api.live-video.create.accept.result' ]) { 123 for (const hook of [ 'filter:api.video.upload.accept.result', 'filter:api.live-video.create.accept.result' ]) {
97 registerHook({ 124 registerHook({
98 target: hook, 125 target: hook,