From 7226e90fdc61a3c6cad5ccab18b6707d55cf0992 Mon Sep 17 00:00:00 2001 From: lutangar Date: Wed, 24 Nov 2021 14:33:14 +0100 Subject: 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. --- shared/models/plugins/server/server-hook.model.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shared') 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 = { // Fired when the application has been loaded and is listening HTTP requests 'action:application.listening': true, + // API actions hooks give access to the original express `req` and `res` parameters + // Fired when a local video is updated 'action:api.video.updated': true, // Fired when a local video is deleted -- cgit v1.2.3