feat: fix issue with listIndexes
This commit is contained in:
parent
cc53f1bf08
commit
a3e3ba9e44
|
@ -1455,17 +1455,11 @@ App::get('/v1/database/collections/:collectionId/indexes')
|
|||
|
||||
$indexes = $collection->getAttribute('indexes');
|
||||
|
||||
$indexes = array_map(function ($index) use ($collection) {
|
||||
return new Document([\array_merge($index, [
|
||||
'collectionId' => $collection->getId(),
|
||||
])]);
|
||||
}, $indexes);
|
||||
|
||||
$usage->setParam('database.collections.read', 1);
|
||||
|
||||
$response->dynamic(new Document([
|
||||
'sum' => \count($indexes),
|
||||
'attributes' => $indexes,
|
||||
'indexes' => $indexes,
|
||||
]), Response::MODEL_INDEX_LIST);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue