Movatterモバイル変換


[0]ホーム

URL:


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

Commitb7aec2b

Browse files
committed
[FIX] Fetch workspace apps correctly
1 parent8b8521b commitb7aec2b

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

‎client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ const EnvironmentDetail: React.FC = () => {
8888
{/* Add more menu items here if needed */}
8989
</Menu>
9090
);
91-
debugger
9291

9392
if(isLoadingEnvironment){
9493
return(

‎client/packages/lowcoder/src/pages/setting/environments/services/environments.service.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,23 +291,22 @@ export async function getWorkspaceApps(
291291
Authorization:`Bearer${apiKey}`
292292
};
293293

294-
// Make the API request to get apps
295-
// Include the orgId as a query parameter if needed
294+
// First, switch to the target workspace
295+
awaitaxios.put(`${apiServiceUrl}/api/organizations/switchOrganization/${workspaceId}`,{},{
296+
headers
297+
});
298+
299+
// Then fetch applications without the orgId parameter
296300
constresponse=awaitaxios.get(`${apiServiceUrl}/api/applications/list`,{
297-
headers,
298-
params:{
299-
orgId:workspaceId
300-
}
301+
headers
301302
});
302303

303304
// Check if response is valid
304305
if(!response.data||!response.data.data){
305306
return[];
306307
}
307308

308-
constfilteredApps=response.data.data.filter((app:App)=>app.orgId===workspaceId);
309-
310-
returnfilteredApps;
309+
returnresponse.data.data;
311310

312311
}catch(error){
313312
// Handle and transform error
@@ -430,7 +429,7 @@ export async function getWorkspaceQueries(
430429
headers,
431430
params
432431
});
433-
debugger
432+
434433
// Check if response is valid
435434
if(!response.data){
436435
return{queries:[],total:0};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp