Refactor subscription and order retrieval methods
The changes refactor how subscription and order data is retrieved throughout the codebase. This includes renaming methods from 'getSubscriptionData' and 'getOrdersData' to 'getSubscription' and 'getOrder' respectively. The code for obtaining these subscriptions and orders has been rewritten for improved clarity and error handling.
This commit is contained in:
@@ -36,8 +36,8 @@ export const loadPersonalAccountBillingPageData = cache((userId: string) => {
|
||||
|
||||
const data =
|
||||
BILLING_MODE === 'subscription'
|
||||
? api.getSubscriptionData(userId)
|
||||
: api.getOrdersData(userId);
|
||||
? api.getSubscription(userId)
|
||||
: api.getOrder(userId);
|
||||
|
||||
const customerId = api.getBillingCustomerId(userId);
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ export const loadTeamAccountBillingPage = cache((accountId: string) => {
|
||||
|
||||
const data =
|
||||
BILLING_MODE === 'subscription'
|
||||
? api.getSubscriptionData(accountId)
|
||||
: api.getOrdersData(accountId);
|
||||
? api.getSubscription(accountId)
|
||||
: api.getOrder(accountId);
|
||||
|
||||
const customerId = api.getBillingCustomerId(accountId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user