1
0
Fork 0
mirror of synced 2024-07-08 07:55:48 +12:00

Fix formatting

This commit is contained in:
Khushboo Verma 2024-04-29 19:14:37 +05:30
parent 564fe96eec
commit 2b69f0b7e2

View file

@ -1524,26 +1524,26 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
])); ]));
$buildId = ID::unique(); $buildId = ID::unique();
$build = $dbForProject->createDocument('builds', new Document([ $build = $dbForProject->createDocument('builds', new Document([
'$id' => $buildId, '$id' => $buildId,
'$permissions' => [], '$permissions' => [],
'startTime' => null, 'startTime' => null,
'deploymentInternalId' => $deployment->getInternalId(), 'deploymentInternalId' => $deployment->getInternalId(),
'deploymentId' => $deployment->getId(), 'deploymentId' => $deployment->getId(),
'status' => 'waiting', 'status' => 'waiting',
'path' => '', 'path' => '',
'runtime' => $function->getAttribute('runtime'), 'runtime' => $function->getAttribute('runtime'),
'source' => $deployment->getAttribute('path', ''), 'source' => $deployment->getAttribute('path', ''),
'sourceType' => '', 'sourceType' => '',
'logs' => '', 'logs' => '',
'endTime' => null, 'endTime' => null,
'duration' => 0, 'duration' => 0,
'size' => 0 'size' => 0
])); ]));
$deployment->setAttribute('buildId', $build->getId()); $deployment->setAttribute('buildId', $build->getId());
$deployment->setAttribute('buildInternalId', $build->getInternalId()); $deployment->setAttribute('buildInternalId', $build->getInternalId());
$deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment);
$queueForBuilds $queueForBuilds
->setType(BUILD_TYPE_DEPLOYMENT) ->setType(BUILD_TYPE_DEPLOYMENT)
@ -1557,7 +1557,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
$response->noContent(); $response->noContent();
}); });
App::patch('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') App::patch('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->desc('Update build status') ->desc('Update build status')
->label('scope', 'functions.write') ->label('scope', 'functions.write')
@ -1606,7 +1606,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
$response->dynamic($build, Response::MODEL_BUILD); $response->dynamic($build, Response::MODEL_BUILD);
}); });
App::post('/v1/functions/:functionId/executions') App::post('/v1/functions/:functionId/executions')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->desc('Create execution') ->desc('Create execution')
->label('scope', 'execution.write') ->label('scope', 'execution.write')
@ -1897,7 +1897,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
->dynamic($execution, Response::MODEL_EXECUTION); ->dynamic($execution, Response::MODEL_EXECUTION);
}); });
App::get('/v1/functions/:functionId/executions') App::get('/v1/functions/:functionId/executions')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->desc('List executions') ->desc('List executions')
->label('scope', 'execution.read') ->label('scope', 'execution.read')
@ -1978,7 +1978,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
]), Response::MODEL_EXECUTION_LIST); ]), Response::MODEL_EXECUTION_LIST);
}); });
App::get('/v1/functions/:functionId/executions/:executionId') App::get('/v1/functions/:functionId/executions/:executionId')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->desc('Get execution') ->desc('Get execution')
->label('scope', 'execution.read') ->label('scope', 'execution.read')
@ -2027,7 +2027,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
// Variables // Variables
App::post('/v1/functions/:functionId/variables') App::post('/v1/functions/:functionId/variables')
->desc('Create variable') ->desc('Create variable')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->label('scope', 'functions.write') ->label('scope', 'functions.write')
@ -2091,7 +2091,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
->dynamic($variable, Response::MODEL_VARIABLE); ->dynamic($variable, Response::MODEL_VARIABLE);
}); });
App::get('/v1/functions/:functionId/variables') App::get('/v1/functions/:functionId/variables')
->desc('List variables') ->desc('List variables')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->label('scope', 'functions.read') ->label('scope', 'functions.read')
@ -2118,7 +2118,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
]), Response::MODEL_VARIABLE_LIST); ]), Response::MODEL_VARIABLE_LIST);
}); });
App::get('/v1/functions/:functionId/variables/:variableId') App::get('/v1/functions/:functionId/variables/:variableId')
->desc('Get variable') ->desc('Get variable')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->label('scope', 'functions.read') ->label('scope', 'functions.read')
@ -2157,7 +2157,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
$response->dynamic($variable, Response::MODEL_VARIABLE); $response->dynamic($variable, Response::MODEL_VARIABLE);
}); });
App::put('/v1/functions/:functionId/variables/:variableId') App::put('/v1/functions/:functionId/variables/:variableId')
->desc('Update variable') ->desc('Update variable')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->label('scope', 'functions.write') ->label('scope', 'functions.write')
@ -2218,7 +2218,7 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
$response->dynamic($variable, Response::MODEL_VARIABLE); $response->dynamic($variable, Response::MODEL_VARIABLE);
}); });
App::delete('/v1/functions/:functionId/variables/:variableId') App::delete('/v1/functions/:functionId/variables/:variableId')
->desc('Delete variable') ->desc('Delete variable')
->groups(['api', 'functions']) ->groups(['api', 'functions'])
->label('scope', 'functions.write') ->label('scope', 'functions.write')