Skip to content

Commit 2123eb7

Browse files
author
FalkWolsky
committed
Send less data & receive better Subscription Context
1 parent c66018b commit 2123eb7

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

client/packages/lowcoder/src/constants/subscriptionConstants.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export enum SubscriptionProductsEnum {
33
SUPPORT = "QW8L3WPMiNjQjI",
44
MEDIAPACKAGE = 'QW8MpIBHxieKXd',
5-
AZUREAPIS = 'premium',
5+
AZUREAPIS = 'QlQ7cdOh8Lv4dy',
66
GOOGLEAPIS = 'enterprise',
77
AWSAPIS = 'enterprise-global',
88
PRIVATECLOUD = 'private-cloud',
@@ -69,6 +69,10 @@ export interface Subscription {
6969
quantity: number;
7070
billing_scheme: string;
7171
price: string;
72+
histId?: string;
73+
orgId?: string;
74+
userId?: string;
75+
customerId?: string;
7276
}
7377

7478
export interface SubscriptionProduct {
@@ -108,9 +112,7 @@ export interface LowcoderNewCustomer {
108112
}
109113

110114
export interface LowcoderSearchCustomer {
111-
hostname: string;
112115
hostId: string;
113-
email: string;
114116
orgId: string;
115117
userId: string;
116118
}

client/packages/lowcoder/src/redux/sagas/subscriptionSagas.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ function* fetchSubscriptionsSaga(action: ReturnType<typeof fetchSubscriptionsAct
1717
const deploymentId: string = yield select(getDeploymentId);
1818

1919
const subscriptionSearchCustomer: LowcoderSearchCustomer = {
20-
hostname: domain,
2120
hostId: deploymentId,
22-
email: currentUser.email,
2321
orgId: orgID,
2422
userId: user.id,
2523
};

client/packages/lowcoder/src/util/context/SimpleSubscriptionContext.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ export const SimpleSubscriptionContextProvider = (props: {
6262
const admin = user.orgRoleMap.get(orgID) === "admin" ? "admin" : "member";
6363

6464
const subscriptionSearchCustomer: LowcoderSearchCustomer = {
65-
hostname: domain,
6665
hostId: deploymentId,
67-
email: currentUser.email,
6866
orgId: orgID,
6967
userId: user.id,
7068
};

client/packages/lowcoder/src/util/context/SubscriptionContext.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ export const SubscriptionContextProvider = (props: {
6464
const userCount = useOrgUserCount(orgID);
6565

6666
const subscriptionSearchCustomer: LowcoderSearchCustomer = {
67-
hostname: domain,
6867
hostId: deploymentId,
69-
email: currentUser.email,
7068
orgId: orgID,
7169
userId: user.id,
7270
};
@@ -128,7 +126,6 @@ export const SubscriptionContextProvider = (props: {
128126
if (subscriptionDataLoaded && userCount > 0) { // Ensure user count is available
129127
try {
130128
console.log("Total Users in Organization:", userCount);
131-
132129
const updatedProducts = await Promise.all(
133130
products.map(async (product) => {
134131
const matchingSubscription = subscriptions.find(

0 commit comments

Comments
 (0)