1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

Added support for count

This commit is contained in:
Eldad Fux 2021-05-03 13:25:05 +03:00
parent 3739be31bb
commit eab18af07e
2 changed files with 4 additions and 6 deletions

View file

@ -179,11 +179,9 @@ App::get('/v1/storage/files')
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\Database\Database $dbForInternal */
$results = $dbForInternal->find('files', [], $limit, $offset);
$response->dynamic2(new Document([
'sum' => $limit,
'files' => $results
'sum' => $dbForInternal->count('files', [], 5000),
'files' => $dbForInternal->find('files', [], $limit, $offset)
]), Response::MODEL_FILE_LIST);
});

4
composer.lock generated
View file

@ -1923,7 +1923,7 @@
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database",
"reference": "518265a14702f61a35b95d4ae25c8b23e7c2b478"
"reference": "81a16f851c712f5857c044c0e71c0abc698cd619"
},
"require": {
"ext-mongodb": "*",
@ -1970,7 +1970,7 @@
"upf",
"utopia"
],
"time": "2021-05-02T18:26:42+00:00"
"time": "2021-05-03T09:59:14+00:00"
},
{
"name": "utopia-php/domains",