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 = () => {
8888 { /* Add more menu items here if needed */ }
8989 </ Menu >
9090 ) ;
91- debugger
9291
9392 if ( isLoadingEnvironment ) {
9493 return (
Original file line number Diff line number Diff 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+ await axios . put ( `${ apiServiceUrl } /api/organizations/switchOrganization/${ workspaceId } ` , { } , {
296+ headers
297+ } ) ;
298+
299+ // Then fetch applications without the orgId parameter
296300 const response = await axios . 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- const filteredApps = response . data . data . filter ( ( app : App ) => app . orgId === workspaceId ) ;
309-
310- return filteredApps ;
309+ return response . 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 } ;
You can’t perform that action at this time.
0 commit comments