upadate to use refactored collections config

This commit is contained in:
Damodar Lohani committed 2023-06-15 00:34:12 +00:00
1 parent c25e014be1
commit 57411db2d3
7 files changed
+21 -18

No files matched your search

@@ -22,7 +22,8 @@ class Base extends Queries
*/
public function __construct(string $collection, array $allowedAttributes)
{
$collection = Config::getParam('collections', [])[$collection];
$config = Config::getParam('collections', []);
$collections = array_merge($config['console'], $config['projects'], $config['buckets'], $config['databases']);
// array for constant lookup time
$allowedAttributesLookup = [];
foreach ($allowedAttributes as $attribute) {