From d220c2bdd77541272b9f9c4486d4526dc8e6bacf Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 22 Jan 2024 14:48:25 +0200 Subject: [PATCH] Added marked_for_deletion and billing_plan_downgrade to hamster export --- src/Appwrite/Platform/Workers/Hamster.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Hamster.php b/src/Appwrite/Platform/Workers/Hamster.php index c12754d134..0fb705d0f7 100644 --- a/src/Appwrite/Platform/Workers/Hamster.php +++ b/src/Appwrite/Platform/Workers/Hamster.php @@ -226,7 +226,7 @@ class Hamster extends Action $billing = $this->getBillingDetails($organization); $statsPerProject['billing_plan'] = $billing['billing_plan'] ?? null; $statsPerProject['billing_start_date'] = $billing['billing_start_date'] ?? null; - + /** Get Domains */ $statsPerProject['custom_domains'] = $dbForConsole->count('rules', [ Query::equal('projectInternalId', [$project->getInternalId()]), @@ -429,6 +429,7 @@ class Hamster extends Action Query::equal('userInternalId', [$user->getInternalId()]) ]); + $billing = $this->getBillingDetails($organization); $statsPerUser['billing_plan'] = $billing['billing_plan'] ?? null; $statsPerUser['billing_start_date'] = $billing['billing_start_date'] ?? null; @@ -468,7 +469,7 @@ class Hamster extends Action } } - private function getBillingDetails(Document $team): array + private function getBillingDetails(bool|Document $team): array { $billing = [];