From d8dd1918c4bdb40bdac4a36534caf47f4495dcd7 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 20 Jan 2026 15:45:12 +0530 Subject: [PATCH] synced vectordb --- app/controllers/api/migrations.php | 4 ++-- app/init/resources.php | 8 ++++++++ .../Databases/Http/VectorDB/Collections/Create.php | 5 +++-- .../Databases/Http/VectorDB/Collections/Delete.php | 1 + .../Http/VectorDB/Collections/Documents/Bulk/Delete.php | 1 + .../Http/VectorDB/Collections/Documents/Bulk/Update.php | 1 + .../Http/VectorDB/Collections/Documents/Bulk/Upsert.php | 1 + .../Http/VectorDB/Collections/Documents/Create.php | 2 ++ .../Http/VectorDB/Collections/Documents/Delete.php | 1 + .../Databases/Http/VectorDB/Collections/Documents/Get.php | 1 + .../Http/VectorDB/Collections/Documents/Logs/XList.php | 2 ++ .../Http/VectorDB/Collections/Documents/Update.php | 1 + .../Http/VectorDB/Collections/Documents/Upsert.php | 1 + .../Http/VectorDB/Collections/Documents/XList.php | 1 + .../Modules/Databases/Http/VectorDB/Collections/Get.php | 1 + .../Http/VectorDB/Collections/Indexes/Create.php | 1 + .../Http/VectorDB/Collections/Indexes/Delete.php | 1 + .../Databases/Http/VectorDB/Collections/Indexes/Get.php | 1 + .../Databases/Http/VectorDB/Collections/Indexes/XList.php | 1 + .../Databases/Http/VectorDB/Collections/Logs/XList.php | 2 ++ .../Databases/Http/VectorDB/Collections/Update.php | 7 +++++-- .../Databases/Http/VectorDB/Collections/Usage/Get.php | 1 + .../Modules/Databases/Http/VectorDB/Collections/XList.php | 1 + .../Modules/Databases/Http/VectorDB/Logs/XList.php | 2 ++ .../Databases/Http/VectorDB/Transactions/Create.php | 1 + .../Http/VectorDB/Transactions/Operations/Create.php | 1 + .../Databases/Http/VectorDB/Transactions/Update.php | 2 ++ .../Modules/Databases/Http/VectorDB/Usage/Get.php | 1 + 28 files changed, 47 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 154792f245..9cbf9a9c57 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -439,7 +439,7 @@ App::post('/v1/migrations/csv/imports') // getting databasetype $resources = explode(':', $resourceId); $databaseId = $resources[0]; - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $database = $authorization->skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $databaseType = $database->getAttribute('type'); if (!in_array($databaseType, CSV_ALLOWED_DATABASE_TYPES)) { throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Database type not supported for csv'); @@ -577,7 +577,7 @@ App::post('/v1/migrations/csv/exports') // getting databasetype $resources = explode(':', $resourceId); $databaseId = $resources[0]; - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $database = $authorization->skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $databaseType = $database->getAttribute('type'); if (!in_array($databaseType, CSV_ALLOWED_DATABASE_TYPES)) { throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Database type not supported for csv'); diff --git a/app/init/resources.php b/app/init/resources.php index 66af4e048d..52b8eb050c 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -31,6 +31,8 @@ use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Executor\Executor; use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis; +use Utopia\Agents\Adapters\Ollama; +use Utopia\Agents\Agent; use Utopia\App; use Utopia\Audit\Adapter\Database as AdapterDatabase; use Utopia\Audit\Audit; @@ -1537,3 +1539,9 @@ App::setResource('executionsRetentionCount', function (Document $project, array return (int) ($plan['executionsRetentionCount'] ?? 100); }, ['project', 'plan']); + +App::setResource('embeddingAgent', function ($register) { + $adapter = new Ollama(); + $adapter->setEndpoint(System::getEnv('_APP_EMBEDDING_ENDPOINT', 'http://ollama:11434/api/embed')); + return new Agent($adapter); +}, ['register']); \ No newline at end of file diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php index 61adb87dac..e621f95c99 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Create.php @@ -77,12 +77,13 @@ class Create extends CollectionAction ->inject('dbForProject') ->inject('getDatabasesDB') ->inject('queueForEvents') + ->inject('authorization') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string $name, int $dimension, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, callable $getDatabasesDB, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $name, int $dimension, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, callable $getDatabasesDB, Event $queueForEvents, Authorization $authorization): void { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $database = $authorization->skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php index 1d89cb0f19..93e79ba7eb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Delete.php @@ -56,6 +56,7 @@ class Delete extends CollectionDelete ->inject('getDatabasesDB') ->inject('queueForDatabase') ->inject('queueForEvents') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Delete.php index 54ff25066c..3827f6f98f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Delete.php @@ -66,6 +66,7 @@ class Delete extends DocumentsDelete ->inject('queueForFunctions') ->inject('queueForWebhooks') ->inject('plan') + ->inject('eventProcessor') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Update.php index fad7adbf34..4276c8f6f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Update.php @@ -68,6 +68,7 @@ class Update extends DocumentsUpdate ->inject('queueForFunctions') ->inject('queueForWebhooks') ->inject('plan') + ->inject('eventProcessor') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Upsert.php index f7d16e4d60..5757c6e205 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Bulk/Upsert.php @@ -68,6 +68,7 @@ class Upsert extends DocumentsUpsert ->inject('queueForFunctions') ->inject('queueForWebhooks') ->inject('plan') + ->inject('eventProcessor') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php index 5550e64fab..30a557c995 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Create.php @@ -109,6 +109,8 @@ class Create extends DocumentCreate ->inject('queueForFunctions') ->inject('queueForWebhooks') ->inject('plan') + ->inject('authorization') + ->inject('eventProcessor') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php index 2464f26f91..ed8e2f6196 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Delete.php @@ -70,6 +70,7 @@ class Delete extends DocumentDelete ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php index 8a1de28148..0c26a5dd07 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Get.php @@ -58,6 +58,7 @@ class Get extends DocumentGet ->inject('getDatabasesDB') ->inject('queueForStatsUsage') ->inject('transactionState') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Logs/XList.php index 56ae0d68ab..68ce13f68f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Logs/XList.php @@ -51,6 +51,8 @@ class XList extends DocumentLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') + ->inject('authorization') + ->inject('audit') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php index b7b06168ff..459745cf4b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Update.php @@ -69,6 +69,7 @@ class Update extends DocumentUpdate ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php index 02c2700e8b..a17d6036a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/Upsert.php @@ -73,6 +73,7 @@ class Upsert extends DocumentUpsert ->inject('queueForStatsUsage') ->inject('transactionState') ->inject('plan') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php index a55db09a65..6f135cb904 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Documents/XList.php @@ -59,6 +59,7 @@ class XList extends DocumentXList ->inject('getDatabasesDB') ->inject('queueForStatsUsage') ->inject('transactionState') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php index 83bde1bf5f..a2bc629caa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Get.php @@ -50,6 +50,7 @@ class Get extends CollectionGet ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Create.php index aecab100e8..5ee3000107 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Create.php @@ -67,6 +67,7 @@ class Create extends IndexCreate ->inject('getDatabasesDB') ->inject('queueForDatabase') ->inject('queueForEvents') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Delete.php index c6ea3da7fe..3a8917cf0e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Delete.php @@ -61,6 +61,7 @@ class Delete extends IndexDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Get.php index b1dedefe2e..2194ee6d45 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/Get.php @@ -52,6 +52,7 @@ class Get extends IndexGet ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/XList.php index c5a1dc48e3..18b265bd00 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Indexes/XList.php @@ -54,6 +54,7 @@ class XList extends IndexXList ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Logs/XList.php index 931620edb8..67b22cd4c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Logs/XList.php @@ -50,6 +50,8 @@ class XList extends CollectionLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') + ->inject('authorization') + ->inject('audit') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php index 5642b36944..6765074d21 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\VectorDB\Collections; +use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Action as CollectionAction; use Appwrite\SDK\AuthType; @@ -9,6 +10,7 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; +use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; @@ -67,12 +69,13 @@ class Update extends CollectionAction ->inject('dbForProject') ->inject('getDatabasesDB') ->inject('queueForEvents') + ->inject('authorization') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, ?string $name, ?int $dimensions, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, \Utopia\Database\Database $dbForProject, callable $getDatabasesDB, \Appwrite\Event\Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, ?string $name, ?int $dimensions, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, callable $getDatabasesDB, Event $queueForEvents, Authorization $authorization): void { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $database = $authorization->skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Usage/Get.php index 00a5eedfb8..2338bc69ea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/Usage/Get.php @@ -57,6 +57,7 @@ class Get extends CollectionUsageGet ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->inject('getDatabasesDB') ->callback($this->action(...)); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php index 1095e5ad25..493696999b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Collections/XList.php @@ -55,6 +55,7 @@ class XList extends CollectionXList ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Logs/XList.php index 6232c4892b..df1c43bddf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Logs/XList.php @@ -52,6 +52,8 @@ class XList extends DatabaseLogs ->inject('dbForProject') ->inject('locale') ->inject('geodb') + ->inject('authorization') + ->inject('audit') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php index 5d13c18378..10d1f6b764 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Create.php @@ -50,6 +50,7 @@ class Create extends TransactionsCreate ->inject('response') ->inject('dbForProject') ->inject('user') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php index eabc4cd825..1ffb627f5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Operations/Create.php @@ -54,6 +54,7 @@ class Create extends OperationsCreate ->inject('dbForProject') ->inject('transactionState') ->inject('plan') + ->inject('authorization') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php index 61725a65f5..096fa35354 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Transactions/Update.php @@ -62,6 +62,8 @@ class Update extends TransactionsUpdate ->inject('queueForRealtime') ->inject('queueForFunctions') ->inject('queueForWebhooks') + ->inject('authorization') + ->inject('eventProcessor') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Usage/Get.php index 5508a9dc91..a6790800c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorDB/Usage/Get.php @@ -53,6 +53,7 @@ class Get extends DatabaseUsageGet ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') + ->inject('authorization') ->callback($this->action(...)); } }