diff options
author | lutangar <johan.dufour@gmail.com> | 2021-11-24 14:33:14 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-11-25 09:54:22 +0100 |
commit | 7226e90fdc61a3c6cad5ccab18b6707d55cf0992 (patch) | |
tree | 0bdd7304352b1af2d9ae87439486a138e02d46e8 /server/controllers/api/videos/live.ts | |
parent | 5098098d96164c93f84ec8419e98fbd83ba8dc71 (diff) | |
download | PeerTube-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 'server/controllers/api/videos/live.ts')
-rw-r--r-- | server/controllers/api/videos/live.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts index efafe64e9..e29615ff5 100644 --- a/server/controllers/api/videos/live.ts +++ b/server/controllers/api/videos/live.ts | |||
@@ -133,7 +133,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) { | |||
133 | return { videoCreated } | 133 | return { videoCreated } |
134 | }) | 134 | }) |
135 | 135 | ||
136 | Hooks.runAction('action:api.live-video.created', { video: videoCreated }) | 136 | Hooks.runAction('action:api.live-video.created', { video: videoCreated, req, res }) |
137 | 137 | ||
138 | return res.json({ | 138 | return res.json({ |
139 | video: { | 139 | video: { |