Pass through resource permissions to createApiKey

Mirror createPlatform's pattern. Resolves to [] today since the SDK
doesn't expose $permissions on Key responses, matching the upstream
createKey endpoint default. Hook is in place if/when the SDK starts
emitting permissions.
This commit is contained in:
Prem Palanisamy committed 2026-05-14 16:17:54 +01:00
1 parent 93715c256b
commit 0bfdd5320e
1 file changed
+1 -1
+1 -1
View File
@@ -3152,7 +3152,7 @@ class Appwrite extends Destination
try {
$this->dbForPlatform->createDocument('keys', new UtopiaDocument([
'$id' => ID::unique(),
'$permissions' => [],
'$permissions' => $resource->getPermissions(),
'resourceInternalId' => $this->projectInternalId,
'resourceId' => $this->project,
'resourceType' => 'projects',