File tree Expand file tree Collapse file tree 3 files changed +21
-11
lines changed
client/packages/lowcoder/src Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export type ResponseType = {
25
25
response : any ;
26
26
} ;
27
27
28
- const apiUrl = "https ://flow.lowcoder.cloud/webhook/secure " ;
28
+ const apiUrl = "http ://localhost:8080/api/flow " ;
29
29
const authHeader = "96a99c7b-3758-4c48-b4b1-a8cbf59e7d6c" ;
30
30
31
31
const currentPage = 1 ;
@@ -41,7 +41,7 @@ const getAxiosInstance = (clientSecret?: string) => {
41
41
42
42
const headers : Record < string , string > = {
43
43
"Content-Type" : "application/json" ,
44
- "Lowcoder-Token" : authHeader ,
44
+ // "Lowcoder-Token": authHeader,
45
45
}
46
46
47
47
const apiRequestConfig : AxiosRequestConfig = {
@@ -55,13 +55,12 @@ const getAxiosInstance = (clientSecret?: string) => {
55
55
56
56
class SubscriptionApi extends Api {
57
57
58
- static async createCustomer ( body : Customer ) : Promise < any > {
58
+ static async createCustomer ( body : any ) : Promise < any > {
59
59
console . log ( "createCustomerCall" , body ) ;
60
60
61
61
let response ;
62
62
try {
63
63
response = await getAxiosInstance ( ) . request ( {
64
- url : '/create-customer' ,
65
64
method : "POST" ,
66
65
withCredentials : true ,
67
66
data : body ,
Original file line number Diff line number Diff line change @@ -129,11 +129,11 @@ export function SettingHome() {
129
129
! enableCustomBrand ( config ) ||
130
130
( ! isSelfDomain ( config ) && ! isEnterpriseMode ( config ) ) ,
131
131
} ,
132
- // {
133
- // key: SettingPageEnum.Subscription,
134
- // label: trans("settings.subscription"),
135
- // icon: <SubscriptionIcon width={"20px"}/>,
136
- // },
132
+ {
133
+ key : SettingPageEnum . Subscription ,
134
+ label : trans ( "settings.subscription" ) ,
135
+ icon : < SubscriptionIcon width = { "20px" } /> ,
136
+ } ,
137
137
] ;
138
138
139
139
return (
@@ -161,7 +161,7 @@ export function SettingHome() {
161
161
{ selectKey === SettingPageEnum . Audit && < AuditSetting /> }
162
162
{ selectKey === SettingPageEnum . Branding && < BrandingSetting /> }
163
163
{ selectKey === SettingPageEnum . Advanced && < AdvancedSetting /> }
164
- { /* { selectKey === SettingPageEnum.Subscription && <Subscription />} */ }
164
+ { selectKey === SettingPageEnum . Subscription && < Subscription /> }
165
165
</ TwoColumnSettingPageContent >
166
166
</ >
167
167
) ;
Original file line number Diff line number Diff line change @@ -70,11 +70,22 @@ export function SubscriptionSetting() {
70
70
}
71
71
} ;
72
72
73
+ const apiBody = {
74
+ path : "webhook/echo" ,
75
+ data : subscriptionCustomer ,
76
+ method : "post" ,
77
+ headers : {
78
+ "Lowcoder-Token" : "96a99c7b-3758-4c48-b4b1-a8cbf59e7d6c" ,
79
+ "Content-Type" : "application/json"
80
+ }
81
+ }
82
+
73
83
const createCustomer = async ( ) => {
84
+
74
85
console . log ( "createCustomerTry" , subscriptionCustomer ) ;
75
86
76
87
try {
77
- const result = await SubscriptionApi . createCustomer ( subscriptionCustomer ) ;
88
+ const result = await SubscriptionApi . createCustomer ( apiBody ) ;
78
89
if ( result ) {
79
90
console . log ( "createCustomer" , result ) ;
80
91
}
You can’t perform that action at this time.
0 commit comments