Added support for count
This commit is contained in:
parent
3739be31bb
commit
eab18af07e
2 changed files with 4 additions and 6 deletions
|
@ -179,11 +179,9 @@ App::get('/v1/storage/files')
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal */
|
/** @var Utopia\Database\Database $dbForInternal */
|
||||||
|
|
||||||
$results = $dbForInternal->find('files', [], $limit, $offset);
|
|
||||||
|
|
||||||
$response->dynamic2(new Document([
|
$response->dynamic2(new Document([
|
||||||
'sum' => $limit,
|
'sum' => $dbForInternal->count('files', [], 5000),
|
||||||
'files' => $results
|
'files' => $dbForInternal->find('files', [], $limit, $offset)
|
||||||
]), Response::MODEL_FILE_LIST);
|
]), Response::MODEL_FILE_LIST);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
4
composer.lock
generated
4
composer.lock
generated
|
@ -1923,7 +1923,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/database",
|
"url": "https://github.com/utopia-php/database",
|
||||||
"reference": "518265a14702f61a35b95d4ae25c8b23e7c2b478"
|
"reference": "81a16f851c712f5857c044c0e71c0abc698cd619"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-mongodb": "*",
|
"ext-mongodb": "*",
|
||||||
|
@ -1970,7 +1970,7 @@
|
||||||
"upf",
|
"upf",
|
||||||
"utopia"
|
"utopia"
|
||||||
],
|
],
|
||||||
"time": "2021-05-02T18:26:42+00:00"
|
"time": "2021-05-03T09:59:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/domains",
|
"name": "utopia-php/domains",
|
||||||
|
|
Loading…
Reference in a new issue