From 63a92a768adf3ccb5cbd9e2cbdd9f8c09dacd3a4 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 17 May 2021 18:52:22 +0300 Subject: [PATCH] Fixed functions webhooks trigger --- app/controllers/api/functions.php | 1 + app/workers/functions.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index e74fc0ee1a..0f009aa404 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -768,6 +768,7 @@ App::post('/v1/functions/:functionId/executions') Resque::enqueue('v1-functions', 'FunctionsV1', [ 'projectId' => $project->getId(), + 'webhooks' => $project->getAttribute('webhooks', []), 'functionId' => $function->getId(), 'executionId' => $execution->getId(), 'trigger' => 'http', diff --git a/app/workers/functions.php b/app/workers/functions.php index 33b300d54b..8bf719e607 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -247,6 +247,7 @@ class FunctionsV1 ResqueScheduler::enqueueAt($next, 'v1-functions', 'FunctionsV1', [ 'projectId' => $projectId, + 'webhooks' => $webhooks, 'functionId' => $function->getId(), 'executionId' => null, 'trigger' => 'schedule', @@ -285,6 +286,9 @@ class FunctionsV1 * @param string $event * @param string $eventData * @param string $data + * @param array $webhooks + * @param string $userId + * @param string $jwt * * @return void */