aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins
diff options
context:
space:
mode:
authorlutangar <johan.dufour@gmail.com>2021-11-24 14:33:14 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-11-25 09:54:22 +0100
commit7226e90fdc61a3c6cad5ccab18b6707d55cf0992 (patch)
tree0bdd7304352b1af2d9ae87439486a138e02d46e8 /shared/models/plugins
parent5098098d96164c93f84ec8419e98fbd83ba8dc71 (diff)
downloadPeerTube-7226e90fdc61a3c6cad5ccab18b6707d55cf0992.tar.gz
PeerTube-7226e90fdc61a3c6cad5ccab18b6707d55cf0992.tar.zst
PeerTube-7226e90fdc61a3c6cad5ccab18b6707d55cf0992.zip
Add `req` and `res` as controllers hooks parameters
Hooks prefixed by `action:api` now give access the original express req and res. Checkout guide.md for possible usage.
Diffstat (limited to 'shared/models/plugins')
-rw-r--r--shared/models/plugins/server/server-hook.model.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/models/plugins/server/server-hook.model.ts b/shared/models/plugins/server/server-hook.model.ts
index 562c6eb12..3ab910197 100644
--- a/shared/models/plugins/server/server-hook.model.ts
+++ b/shared/models/plugins/server/server-hook.model.ts
@@ -85,6 +85,8 @@ export const serverActionHookObject = {
85 // Fired when the application has been loaded and is listening HTTP requests 85 // Fired when the application has been loaded and is listening HTTP requests
86 'action:application.listening': true, 86 'action:application.listening': true,
87 87
88 // API actions hooks give access to the original express `req` and `res` parameters
89
88 // Fired when a local video is updated 90 // Fired when a local video is updated
89 'action:api.video.updated': true, 91 'action:api.video.updated': true,
90 // Fired when a local video is deleted 92 // Fired when a local video is deleted