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',