diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index 4b996baaff..97b7ec0d6c 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -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; }