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

Commit9c7c221

Browse files
committed
update workspace endpoint for new plugin
1 parentaeb9b0b commit9c7c221

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

‎client/packages/lowcoder/src/pages/setting/environments/config/workspace.config.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,17 @@ export const workspaceConfig: DeployableItemConfig<Workspace, WorkspaceStats> =
159159
// Deploy configuration
160160
deploy:{
161161
enabled:true,
162-
fields:[
163-
{
164-
name:'updateDependenciesIfNeeded',
165-
label:'Update Dependencies If Needed',
166-
type:'checkbox',
167-
defaultValue:false
168-
}
169-
],
162+
fields:[],
170163
prepareParams:(item:Workspace,values:any,sourceEnv:Environment,targetEnv:Environment)=>{
164+
if(!item.gid){
165+
console.error('Missing workspace.gid when deploying workspace:',item);
166+
}
167+
console.log('item.gid',item.gid);
168+
171169
return{
172170
envId:sourceEnv.environmentId,
173171
targetEnvId:targetEnv.environmentId,
174-
workspaceId:item.id,
175-
updateDependenciesIfNeeded:values.updateDependenciesIfNeeded
172+
workspaceId:item.gid
176173
};
177174
},
178175
execute:(params:any)=>deployWorkspace(params)

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,20 @@ export async function deployWorkspace(params: {
8585
envId:string;
8686
targetEnvId:string;
8787
workspaceId:string;
88-
updateDependenciesIfNeeded?:boolean;
8988
}):Promise<boolean>{
9089
try{
91-
constresponse=awaitaxios.post('/api/plugins/enterprise/deploy',params);
90+
// Use the new endpoint format with only essential parameters
91+
constresponse=awaitaxios.post('/api/plugins/enterprise/org/deploy',null,{
92+
params:{
93+
orgGid:params.workspaceId,// Using workspaceId as orgGid
94+
envId:params.envId,
95+
targetEnvId:params.targetEnvId
96+
}
97+
});
9298
returnresponse.status===200;
9399
}catch(error){
94100
consterrorMessage=errorinstanceofError ?error.message :'Failed to deploy workspace';
95-
message.error(errorMessage);
96-
throwerror;
101+
// Don't showmessage directly, let the calling component handle it
102+
thrownewError(errorMessage);
97103
}
98104
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp