Updates
This commit is contained in:
parent
70e4bd844e
commit
294e0e7469
|
@ -42,10 +42,12 @@ Server::setResource('execute', function () {
|
||||||
|
|
||||||
$user ??= new Document();
|
$user ??= new Document();
|
||||||
$functionId = $function->getId();
|
$functionId = $function->getId();
|
||||||
|
$functionInternalId = $function->getInternalId();
|
||||||
$deploymentId = $function->getAttribute('deployment', '');
|
$deploymentId = $function->getAttribute('deployment', '');
|
||||||
|
|
||||||
/** Check if deployment exists */
|
/** Check if deployment exists */
|
||||||
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
||||||
|
$deploymentInternalId = $deployment->getInternalId();
|
||||||
|
|
||||||
if ($deployment->getAttribute('resourceId') !== $functionId) {
|
if ($deployment->getAttribute('resourceId') !== $functionId) {
|
||||||
throw new Exception('Deployment not found. Create deployment before trying to execute a function');
|
throw new Exception('Deployment not found. Create deployment before trying to execute a function');
|
||||||
|
@ -82,6 +84,8 @@ Server::setResource('execute', function () {
|
||||||
'$id' => $executionId,
|
'$id' => $executionId,
|
||||||
'$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))],
|
'$permissions' => $user->isEmpty() ? [] : [Permission::read(Role::user($user->getId()))],
|
||||||
'functionId' => $functionId,
|
'functionId' => $functionId,
|
||||||
|
'functionInternalId' => $functionInternalId,
|
||||||
|
'deploymentInternalId' => $deploymentInternalId,
|
||||||
'deploymentId' => $deploymentId,
|
'deploymentId' => $deploymentId,
|
||||||
'trigger' => $trigger,
|
'trigger' => $trigger,
|
||||||
'status' => 'waiting',
|
'status' => 'waiting',
|
||||||
|
|
Loading…
Reference in a new issue