diff --git a/app/init/resources/request.php b/app/init/resources/request.php index 68a8af3605..6db371b8c3 100644 --- a/app/init/resources/request.php +++ b/app/init/resources/request.php @@ -1138,13 +1138,6 @@ return function (Container $context): void { } } - // Backwards compatibility: We cannot have organization project API call without organitation, take first one - if (empty($teamId)) { - if (!$user->isEmpty()) { - $teamId = ($user->getAttribute('memberships', [])[0] ?? new Document())->getAttribute('teamId', ''); - } - } - if (!empty($teamId)) { $team = $authorization->skip(function () use ($dbForPlatform, $teamId) { return $dbForPlatform->getDocument('teams', $teamId); diff --git a/src/Appwrite/Platform/Modules/Organization/Http/Projects/Create.php b/src/Appwrite/Platform/Modules/Organization/Http/Projects/Create.php index c84fa80381..88a17cdd7a 100644 --- a/src/Appwrite/Platform/Modules/Organization/Http/Projects/Create.php +++ b/src/Appwrite/Platform/Modules/Organization/Http/Projects/Create.php @@ -67,7 +67,7 @@ class Create extends Action ->param('projectId', '', new ProjectId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('region', System::getEnv('_APP_REGION', 'default'), new WhiteList(array_keys(array_filter(Config::getParam('regions'), fn ($config) => !$config['disabled']))), 'Project Region.', true) - ->param('teamId', '', new UID(), 'Team unique ID.', deprecated: true) // Backwards compatibility + ->param('teamId', '', new UID(), 'Team unique ID.', deprecated: true, optional: true) // Backwards compatibility ->inject('response') ->inject('dbForPlatform') ->inject('cache')