mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Query keys by resourceInternalId/resourceType, not projectInternalId
projectInternalId is a written-but-not-queryable legacy column on the keys collection (upstream filter uses resourceInternalId + resourceType). Mirror that here so the duplicate-check find() doesn't error out.
This commit is contained in:
1 parent
59479d04d2
commit
f4718e26cb
1 file changed
+2
-1
@@ -3135,7 +3135,8 @@ class Appwrite extends Destination
|
||||
protected function createApiKey(ApiKey $resource): bool
|
||||
{
|
||||
$existing = $this->dbForPlatform->findOne('keys', [
|
||||
Query::equal('projectInternalId', [$this->projectInternalId]),
|
||||
Query::equal('resourceType', ['projects']),
|
||||
Query::equal('resourceInternalId', [$this->projectInternalId]),
|
||||
Query::equal('name', [$resource->getApiKeyName()]),
|
||||
]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user