remove region from update

This commit is contained in:
Damodar Lohani
2022-09-21 02:01:59 +00:00
parent 6d9f43be5d
commit 3166be9da0
+1 -3
View File
@@ -367,7 +367,6 @@ App::patch('/v1/projects/:projectId')
->label('sdk.response.model', Response::MODEL_PROJECT)
->param('projectId', '', new UID(), 'Project unique ID.')
->param('name', null, new Text(128), 'Project name. Max length: 128 chars.')
->param('region', '', new Whitelist(explode(',', App::getEnv('_APP_REGIONS', ''))), 'Project URL.')
->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true)
->param('logo', '', new Text(1024), 'Project logo.', true)
->param('url', '', new URL(), 'Project URL.', true)
@@ -379,7 +378,7 @@ App::patch('/v1/projects/:projectId')
->param('legalTaxId', '', new Text(256), 'Project legal tax ID. Max length: 256 chars.', true)
->inject('response')
->inject('dbForConsole')
->action(function (string $projectId, string $name, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Response $response, Database $dbForConsole) {
->action(function (string $projectId, string $name, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Response $response, Database $dbForConsole) {
$project = $dbForConsole->getDocument('projects', $projectId);
@@ -389,7 +388,6 @@ App::patch('/v1/projects/:projectId')
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project
->setAttribute('name', $name)
->setAttribute('region', $region)
->setAttribute('description', $description)
->setAttribute('logo', $logo)
->setAttribute('url', $url)