1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Added response model payload as webhook payload

This commit is contained in:
Eldad Fux 2020-09-08 23:08:55 +03:00
parent 9bd3e4dcbd
commit fd93c61009

View file

@ -274,11 +274,12 @@ App::shutdown(function ($utopia, $request, $response, $project, $webhooks, $audi
/** @var bool $mode */
if (!empty($functions->getParam('event'))) {
$functions->setParam('payload', $webhooks->getParam('payload'));
$functions->setParam('payload', $response->getPayload());
$functions->trigger();
}
if (!empty($webhooks->getParam('event'))) {
$webhooks->setParam('payload', $response->getPayload());
$webhooks->trigger();
}