mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix(database): properly cast to int
This commit is contained in:
1 parent
ae8583f3a2
commit
d9986cb205
5 files changed
+25
-8
No files matched your search
@@ -436,6 +436,12 @@ App::get('/v1/database/collections/:collectionId/documents')
|
||||
throw new Exception('Collection not found', 404);
|
||||
}
|
||||
|
||||
$types = [];
|
||||
foreach ($collection->getAttribute('rules') as $rule) {
|
||||
/** @var Document $rule */
|
||||
$types[$rule->getAttribute('key')] = $rule->getAttribute('type');
|
||||
}
|
||||
|
||||
$list = $projectDB->getCollection([
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
@@ -446,7 +452,7 @@ App::get('/v1/database/collections/:collectionId/documents')
|
||||
'filters' => \array_merge($filters, [
|
||||
'$collection='.$collectionId,
|
||||
]),
|
||||
]);
|
||||
], $types);
|
||||
|
||||
// if (App::isDevelopment()) {
|
||||
// $collection
|
||||
|
||||
Reference in new issue
Block a user