1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

chore: refactor code

This commit is contained in:
德华 刘 2024-01-22 08:30:48 +00:00
parent ff7523d6db
commit d04f9f41c3

View file

@ -223,7 +223,6 @@ class Hamster extends Action
Query::equal('$internalId', [$teamInternalId])
]);
/** Add billing information */
$billing = $this->getBillingDetails($organization);
$statsPerProject['billing_plan'] = $billing['billing_plan'] ?? null;
$statsPerProject['billing_start_date'] = $billing['billing_start_date'] ?? null;
@ -367,7 +366,6 @@ class Hamster extends Action
/** Organization name */
$statsPerOrganization['name'] = $organization->getAttribute('name');
/** Get Email and of the organization owner */
$membership = $dbForConsole->findOne('memberships', [
Query::equal('teamInternalId', [$organization->getInternalId()]),
@ -424,17 +422,17 @@ class Hamster extends Action
try {
$statsPerUser = [];
$statsPerUser['time'] = $user->getAttribute('$time');
/** Add billing information */
$organization = $dbForConsole->findOne('teams', [
Query::equal('userInternalId', [$user->getInternalId()])
]);
/** Add billing information */
$billing = $this->getBillingDetails($organization);
$statsPerUser['billing_plan'] = $billing['billing_plan'] ?? null;
$statsPerUser['billing_start_date'] = $billing['billing_start_date'] ?? null;
$statsPerUser['time'] = $user->getAttribute('$time');
/** Organization name */
$statsPerUser['name'] = $user->getAttribute('name');