upadate to use refactored collections config

This commit is contained in:
Damodar Lohani
2023-06-15 00:34:12 +00:00
parent c25e014be1
commit 57411db2d3
7 changed files with 21 additions and 18 deletions
@@ -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) {