From d14fbde9e70cc79e835c3e1a0d5b3bff4bc330ca Mon Sep 17 00:00:00 2001 From: Prateek Banga Date: Wed, 13 Sep 2023 00:40:51 +0530 Subject: [PATCH] removes provider sub query --- app/config/collections.php | 11 ----------- app/init.php | 18 ------------------ 2 files changed, 29 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index eebd6d31d5..3deb29636a 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1861,17 +1861,6 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => ID::custom('provider'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => Database::LENGTH_KEY, - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => ['subQueryProvider'], - ], [ '$id' => ID::custom('identifier'), 'type' => Database::VAR_STRING, diff --git a/app/init.php b/app/init.php index 072384919b..dde6d2a199 100644 --- a/app/init.php +++ b/app/init.php @@ -544,24 +544,6 @@ Database::addFilter( } ); -Database::addFilter( - 'subQueryProvider', - function (mixed $value) { - return null; - }, - function (mixed $value, Document $document, Database $database) { - $provider = Authorization::skip(fn () => $database - ->getDocument( - 'providers', - $document->getAttribute('providerId'), - )); - if (!$provider->isEmpty()) { - return $provider; - } - return null; - } -); - Database::addFilter( 'subQueryTopicTargets', function (mixed $value) {