mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
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.
This commit is contained in:
parent
5098098d96
commit
7226e90fdc
12 changed files with 41 additions and 23 deletions
|
@ -153,7 +153,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
|
|||
Notifier.Instance.notifyOnNewVideoIfNeeded(videoInstanceUpdated)
|
||||
}
|
||||
|
||||
Hooks.runAction('action:api.video.updated', { video: videoInstanceUpdated, body: req.body })
|
||||
Hooks.runAction('action:api.video.updated', { video: videoInstanceUpdated, body: req.body, req, res })
|
||||
} catch (err) {
|
||||
// Force fields we want to update
|
||||
// If the transaction is retried, sequelize will think the object has not changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue