From 49fa26b18c7e3b4cacd4f5ebb59816c8734a4c18 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 28 Jun 2021 09:56:03 +0200 Subject: [PATCH] fix model for connections --- app/workers/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 2fd54587d1..2bf2216bd0 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -7,6 +7,7 @@ use Appwrite\Database\Adapter\Redis as RedisAdapter; use Appwrite\Database\Validator\Authorization; use Appwrite\Event\Event; use Appwrite\Resque\Worker; +use Appwrite\Utopia\Response\Model\Execution; use Cron\CronExpression; use Swoole\Runtime; use Utopia\App; @@ -480,6 +481,7 @@ class FunctionsV1 extends Worker throw new Exception('Failed saving execution to DB', 500); } + $executionModel = new Execution(); $executionUpdate = new Event('v1-webhooks', 'WebhooksV1'); $executionUpdate @@ -487,7 +489,7 @@ class FunctionsV1 extends Worker ->setParam('userId', $userId) ->setParam('webhooks', $webhooks) ->setParam('event', 'functions.executions.update') - ->setParam('eventData', $execution->getArrayCopy()); + ->setParam('eventData', $execution->getArrayCopy(array_keys($executionModel->getRules()))); $executionUpdate->trigger();