From 294e0e7469b375186c940462be5d1e248e9c5a4a Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 9 Mar 2023 14:14:40 +0200 Subject: [PATCH] Updates --- app/workers/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/workers/functions.php b/app/workers/functions.php index 0f651de250..09b3d793e9 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -42,10 +42,12 @@ Server::setResource('execute', function () { $user ??= new Document(); $functionId = $function->getId(); + $functionInternalId = $function->getInternalId(); $deploymentId = $function->getAttribute('deployment', ''); /** Check if deployment exists */ $deployment = $dbForProject->getDocument('deployments', $deploymentId); + $deploymentInternalId = $deployment->getInternalId(); if ($deployment->getAttribute('resourceId') !== $functionId) { throw new Exception('Deployment not found. Create deployment before trying to execute a function'); @@ -82,6 +84,8 @@ Server::setResource('execute', function () { '$id' => $executionId, '$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))], 'functionId' => $functionId, + 'functionInternalId' => $functionInternalId, + 'deploymentInternalId' => $deploymentInternalId, 'deploymentId' => $deploymentId, 'trigger' => $trigger, 'status' => 'waiting',