Rename source project to projectId; hold Project SDK service as project

This commit is contained in:
Prem Palanisamy committed 2026-05-14 07:50:36 +01:00
1 parent d7b51752dc
commit 0713d21ee4
1 file changed
+8 -8
+8 -8
View File
@@ -94,7 +94,7 @@ class Appwrite extends Source
private Sites $sites;
private Project $projectService;
private Project $project;
/**
* @var callable(UtopiaDocument $database|null): UtopiaDatabase
@@ -105,7 +105,7 @@ class Appwrite extends Source
* @throws \Exception
*/
public function __construct(
protected string $project,
protected string $projectId,
protected string $endpoint,
protected string $key,
callable $getDatabasesDB,
@@ -115,7 +115,7 @@ class Appwrite extends Source
) {
$this->client = (new Client())
->setEndpoint($endpoint)
->setProject($project)
->setProject($projectId)
->setKey($key);
$this->users = new Users($this->client);
@@ -124,9 +124,9 @@ class Appwrite extends Source
$this->functions = new Functions($this->client);
$this->messaging = new Messaging($this->client);
$this->sites = new Sites($this->client);
$this->projectService = new Project($this->client);
$this->project = new Project($this->client);
$this->headers['x-appwrite-project'] = $this->project;
$this->headers['x-appwrite-project'] = $this->projectId;
$this->headers['x-appwrite-key'] = $this->key;
$this->getDatabasesDB = $getDatabasesDB;
@@ -143,7 +143,7 @@ class Appwrite extends Source
$this->reader = new DatabaseReader(
$this->dbForProject,
$this->getDatabasesDB,
$this->project
$this->projectId
);
break;
@@ -2234,7 +2234,7 @@ class Appwrite extends Source
limit: 1
);
try {
$report[Resource::TYPE_PLATFORM] = $this->projectService->listPlatforms($platformQueries)->total;
$report[Resource::TYPE_PLATFORM] = $this->project->listPlatforms($platformQueries)->total;
} catch (\Throwable) {
$report[Resource::TYPE_PLATFORM] = 0;
}
@@ -2335,7 +2335,7 @@ class Appwrite extends Source
$queries[] = Query::cursorAfter($lastId);
}
$response = $this->projectService->listPlatforms($queries);
$response = $this->project->listPlatforms($queries);
if ($response->total === 0) {
break;
}