Skip to content

Commit b9bd36f

Browse files
committed
Query validator should accept array of $attribute documents
1 parent 9b46976 commit b9bd36f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/Database/Validator/QueryValidator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Utopia\Database\Validator;
44

55
use Utopia\Validator;
6+
use Utopia\Database\Document;
67
use Utopia\Database\Query;
78

89
class QueryValidator extends Validator
@@ -34,11 +35,13 @@ class QueryValidator extends Validator
3435
/**
3536
* Expression constructor
3637
*
37-
* @param array $schema
38+
* @param array $attributes
3839
*/
39-
public function __construct($schema)
40+
public function __construct($attributes)
4041
{
41-
$this->schema = $schema;
42+
foreach ($attributes as $attribute) {
43+
$this->schema[] = $attribute->getArrayCopy();
44+
}
4245
}
4346

4447
/**

0 commit comments

Comments
 (0)