fix(database): properly cast to int

This commit is contained in:
Torsten Dittmann committed 2021-07-05 11:33:47 +02:00
1 parent ae8583f3a2
commit d9986cb205
5 files changed
+25 -8

No files matched your search

+7 -1
View File
@@ -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