From 0d0abef508075822cec38efc2a89bf3298aa3684 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 30 Dec 2021 11:27:46 +0100 Subject: [PATCH] feat: limit database to 100 queries --- app/controllers/api/database.php | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 1fdd20e0b..4e5020d11 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -1681,7 +1681,7 @@ App::get('/v1/database/collections/:collectionId/documents') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST) ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') - ->param('queries', [], new ArrayList(new Text(0)), 'Array of query strings.', true) // TODO: research limitations - temporarily unlimited length + ->param('queries', [], new ArrayList(new Text(0), 100), 'Array of query strings.', true) ->param('limit', 25, new Range(0, 100), 'Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, APP_LIMIT_COUNT), 'Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)', true) ->param('cursor', '', new UID(), 'ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)', true) diff --git a/composer.lock b/composer.lock index 347db5efb..778756ca3 100644 --- a/composer.lock +++ b/composer.lock @@ -2255,16 +2255,16 @@ }, { "name": "utopia-php/framework", - "version": "0.19.3", + "version": "0.19.4", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "4c6c841d738cec458b73fec5aedd40fd43bd41a7" + "reference": "b1c79f199a6adbf8526cea272d931213a8eb511d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/4c6c841d738cec458b73fec5aedd40fd43bd41a7", - "reference": "4c6c841d738cec458b73fec5aedd40fd43bd41a7", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/b1c79f199a6adbf8526cea272d931213a8eb511d", + "reference": "b1c79f199a6adbf8526cea272d931213a8eb511d", "shasum": "" }, "require": { @@ -2298,9 +2298,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.19.3" + "source": "https://github.com/utopia-php/framework/tree/0.19.4" }, - "time": "2021-12-17T13:04:13+00:00" + "time": "2021-12-29T15:05:19+00:00" }, { "name": "utopia-php/image",