mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
feat: Adding cli to the function deployment type
This commit is contained in:
parent
1cb490a36e
commit
ca7f222640
1 changed files with 3 additions and 2 deletions
|
|
@ -1163,6 +1163,7 @@ App::post('/v1/functions/:functionId/deployments')
|
|||
}
|
||||
|
||||
$activate = (bool) filter_var($activate, FILTER_VALIDATE_BOOLEAN);
|
||||
$type = $request->getHeader('x-sdk-language') === 'cli' ? 'cli' : 'manual';
|
||||
|
||||
if ($chunksUploaded === $chunks) {
|
||||
if ($activate) {
|
||||
|
|
@ -1200,7 +1201,7 @@ App::post('/v1/functions/:functionId/deployments')
|
|||
'search' => implode(' ', [$deploymentId, $entrypoint]),
|
||||
'activate' => $activate,
|
||||
'metadata' => $metadata,
|
||||
'type' => 'manual'
|
||||
'type' => $type
|
||||
]));
|
||||
} else {
|
||||
$deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment->setAttribute('size', $fileSize)->setAttribute('metadata', $metadata));
|
||||
|
|
@ -1233,7 +1234,7 @@ App::post('/v1/functions/:functionId/deployments')
|
|||
'search' => implode(' ', [$deploymentId, $entrypoint]),
|
||||
'activate' => $activate,
|
||||
'metadata' => $metadata,
|
||||
'type' => 'manual'
|
||||
'type' => $type
|
||||
]));
|
||||
} else {
|
||||
$deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment->setAttribute('chunksUploaded', $chunksUploaded)->setAttribute('metadata', $metadata));
|
||||
|
|
|
|||
Loading…
Reference in a new issue