File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
client/packages/lowcoder/src/pages/setting/environments Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ const EnvironmentDetail: React.FC = () => {
88
88
{ /* Add more menu items here if needed */ }
89
89
</ Menu >
90
90
) ;
91
- debugger
92
91
93
92
if ( isLoadingEnvironment ) {
94
93
return (
Original file line number Diff line number Diff line change @@ -291,23 +291,22 @@ export async function getWorkspaceApps(
291
291
Authorization : `Bearer ${ apiKey } `
292
292
} ;
293
293
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
+ await axios . put ( `${ apiServiceUrl } /api/organizations/switchOrganization/${ workspaceId } ` , { } , {
296
+ headers
297
+ } ) ;
298
+
299
+ // Then fetch applications without the orgId parameter
296
300
const response = await axios . get ( `${ apiServiceUrl } /api/applications/list` , {
297
- headers,
298
- params : {
299
- orgId : workspaceId
300
- }
301
+ headers
301
302
} ) ;
302
303
303
304
// Check if response is valid
304
305
if ( ! response . data || ! response . data . data ) {
305
306
return [ ] ;
306
307
}
307
308
308
- const filteredApps = response . data . data . filter ( ( app : App ) => app . orgId === workspaceId ) ;
309
-
310
- return filteredApps ;
309
+ return response . data . data ;
311
310
312
311
} catch ( error ) {
313
312
// Handle and transform error
@@ -430,7 +429,7 @@ export async function getWorkspaceQueries(
430
429
headers,
431
430
params
432
431
} ) ;
433
- debugger
432
+
434
433
// Check if response is valid
435
434
if ( ! response . data ) {
436
435
return { queries : [ ] , total : 0 } ;
You can’t perform that action at this time.
0 commit comments