Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e29a222

Browse files
author
FalkWolsky
committed
Search and AssetURL APis changed to Flow Endpoint
1 parent 58114c7 commit e29a222

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎client/packages/lowcoder/src/api/iconFlowApi.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class IconFlowApi extends Api {
7171
const retrySource = axios.CancelToken.source();
7272
const retryTimeoutId = setTimeout(() => {
7373
retrySource.cancel("Retry request timed out.");
74-
}, 10000);
74+
}, 20000);
7575

7676
response = await axiosInstance.request({
7777
...requestConfig,
@@ -105,7 +105,7 @@ export const searchAssets = async (searchParameters : SearchParams) => {
105105
};
106106
try {
107107
const result = await IconFlowApi.secureRequest(apiBody);
108-
return result?.response?.items?.total > 0 ? result.response.items as any : null;
108+
return result?.data?.response?.items?.total > 0 ? result.data.response.items as any : null;
109109
} catch (error) {
110110
console.error("Error searching Design Assets:", error);
111111
throw error;
@@ -115,14 +115,14 @@ export const searchAssets = async (searchParameters : SearchParams) => {
115115
export const getAssetLinks = async (uuid: string, params: Record<string, string>) => {
116116
const apiBody = {
117117
path: "webhook/scout/get-asset-links",
118-
data: params,
118+
data: {"uuid" : uuid,"params" : params},
119119
method: "post",
120120
headers: lcHeaders
121121
};
122122
try {
123123
const result = await IconFlowApi.secureRequest(apiBody);
124124

125-
return result?.response?.items?.total > 0 ? result.response.items as any : null;
125+
return result?.data?.response?.download?.url.length > 0 ? result.data.response.download as any : null;
126126
} catch (error) {
127127
console.error("Error searching Design Assets:", error);
128128
throw error;

‎client/packages/lowcoder/src/comps/controls/iconscoutControl.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ export const IconPicker = (props: {
253253
query,
254254
});
255255
setLoading(false);
256+
257+
console.log("freeResult", freeResult, "premiumResult", premiumResult)
258+
256259
setSearchResults([...freeResult.data, ...premiumResult.data]);
257260
};
258261

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /