Implement Suggestions
This commit is contained in:
parent
e866a352a7
commit
4e14d892b0
|
@ -586,7 +586,7 @@ App::post('/v1/functions/:functionId/tags')
|
|||
->setParam('storage', $tag->getAttribute('size', 0))
|
||||
;
|
||||
|
||||
// Send start build reqeust to executor using /v1/build/:buildId
|
||||
// Send start build reqeust to executor using /v1/tag
|
||||
$function = $dbForProject->getDocument('functions', $functionId);
|
||||
|
||||
$ch = \curl_init();
|
||||
|
@ -924,6 +924,7 @@ App::post('/v1/functions/:functionId/executions')
|
|||
$response->dynamic($execution, Response::MODEL_EXECUTION);
|
||||
return $response;
|
||||
}
|
||||
|
||||
// Directly execute function.
|
||||
$ch = \curl_init();
|
||||
\curl_setopt($ch, CURLOPT_URL, "http://appwrite-executor:8080/v1/execute");
|
||||
|
@ -1117,9 +1118,9 @@ App::get('/v1/builds/:buildId')
|
|||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForProject */
|
||||
|
||||
Authorization::disable();
|
||||
$build = $dbForProject->getDocument('builds', $buildId);
|
||||
Authorization::reset();
|
||||
$build = Authorization::skip(function () use ($dbForProject, $buildId) {
|
||||
return $dbForProject->getDocument('builds', $buildId);
|
||||
});
|
||||
|
||||
if ($build->isEmpty()) {
|
||||
throw new Exception('Build not found', 404);
|
||||
|
@ -1147,7 +1148,9 @@ App::post('/v1/builds/:buildId')
|
|||
/** @var Utopia\Database\Database $dbForProject */
|
||||
/** @var Utopia\Database\Document $project */
|
||||
|
||||
$build = $dbForProject->getDocument('builds', $buildId);
|
||||
$build = Authorization::skip(function () use ($dbForProject, $buildId) {
|
||||
return $dbForProject->getDocument('builds', $buildId);
|
||||
});
|
||||
|
||||
if ($build->isEmpty()) {
|
||||
throw new Exception('Build not found', 404);
|
||||
|
|
Loading…
Reference in a new issue