From 406181e88773d7ba84087a51b05b0edae8d7b5db Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 19 Dec 2025 19:31:05 +0530 Subject: [PATCH] revert: to method call --- .../Platform/Modules/Projects/Http/Projects/XList.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php index 5f2996aff4..1726321a90 100644 --- a/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php +++ b/src/Appwrite/Platform/Modules/Projects/Http/Projects/XList.php @@ -19,6 +19,7 @@ use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Scope\HTTP; +use Utopia\Validator; use Utopia\Validator\Boolean; use Utopia\Validator\Text; @@ -29,6 +30,11 @@ class XList extends Action // cached mapping of columns to their subQuery filters private static ?array $attributeToSubQueryFilters = null; + protected function getQueriesValidator(): Validator + { + return new Projects(); + } + public static function getName() { return 'listProjects'; @@ -58,7 +64,7 @@ class XList extends Action ], contentType: ContentType::JSON )) - ->param('queries', [], new Projects(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Projects::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], $this->getQueriesValidator(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Projects::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->param('total', true, new Boolean(true), 'When set to false, the total count returned will be 0 and will not be calculated.', true) ->inject('request')