diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php index 1c624d00c6..3990eba3fb 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php @@ -12,21 +12,16 @@ class Projects extends Base ]; /** - * Expression constructor - * + * @param array|null $allowedAttributes + * @throws \Exception */ - public function __construct() + public function __construct(array $allowedAttributes = null) { - parent::__construct('projects', $this->getAllowedAttributes()); + parent::__construct('projects', $allowedAttributes ?? static::ALLOWED_ATTRIBUTES); } public function isSelectQueryAllowed(): bool { return true; } - - public function getAllowedAttributes(): array - { - return self::ALLOWED_ATTRIBUTES; - } }