Drop dead headers/key plumbing and redundant status check

$this->headers/endpoint/key were only read by the inherited call() method
which the destination no longer invokes. STATUS_ERROR is never set inside
createPlatform/createApiKey (they throw), so the guard only needs SKIPPED.
This commit is contained in:
Prem Palanisamy committed 2026-05-14 09:34:55 +01:00
1 parent 9e54ff0c20
commit 8286322009
1 file changed
+1 -8
+1 -8
View File
@@ -91,8 +91,6 @@ class Appwrite extends Destination
protected Client $client;
protected string $project;
protected string $key;
private Functions $functions;
private Messaging $messaging;
private Sites $sites;
@@ -169,8 +167,6 @@ class Appwrite extends Destination
?callable $getDatabaseDSN = null,
) {
$this->project = $project;
$this->endpoint = $endpoint;
$this->key = $key;
$this->client = (new Client())
->setEndpoint($endpoint)
@@ -184,9 +180,6 @@ class Appwrite extends Destination
$this->teams = new Teams($this->client);
$this->users = new Users($this->client);
$this->headers['x-appwrite-project'] = $this->project;
$this->headers['x-appwrite-key'] = $this->key;
$this->getDatabasesDB = $getDatabasesDB;
$this->getDatabaseDSN = $getDatabaseDSN;
}
@@ -3085,7 +3078,7 @@ class Appwrite extends Destination
break;
}
if ($resource->getStatus() !== Resource::STATUS_SKIPPED && $resource->getStatus() !== Resource::STATUS_ERROR) {
if ($resource->getStatus() !== Resource::STATUS_SKIPPED) {
$resource->setStatus(Resource::STATUS_SUCCESS);
}