Match upstream createKey schema in createApiKey

Drop the removed projectInternalId/projectId legacy fields and use
empty permissions, matching the current server-ce Project/Keys/Create
action exactly.
This commit is contained in:
Prem Palanisamy committed 2026-05-14 15:53:20 +01:00
1 parent f4718e26cb
commit 93715c256b
1 file changed
+1 -8
+1 -8
View File
@@ -3152,14 +3152,7 @@ class Appwrite extends Destination
try {
$this->dbForPlatform->createDocument('keys', new UtopiaDocument([
'$id' => ID::unique(),
// Match upstream createKey — keys carry no per-doc perm semantics in Appwrite.
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
Permission::delete(Role::any()),
],
'projectInternalId' => $this->projectInternalId,
'projectId' => $this->project,
'$permissions' => [],
'resourceInternalId' => $this->projectInternalId,
'resourceId' => $this->project,
'resourceType' => 'projects',