Browse Source

fix: 解决应用升级无法编辑最新配置的问题 (#1824)

pull/1825/head
zhengkunwang 1 year ago committed by GitHub
parent
commit
7eb96a35df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      backend/app/service/app_install.go

15
backend/app/service/app_install.go

@ -569,10 +569,10 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
if err != nil {
return nil, err
}
if err := json.Unmarshal([]byte(detail.Params), &appForm); err != nil {
if err = json.Unmarshal([]byte(detail.Params), &appForm); err != nil {
return nil, err
}
if err := json.Unmarshal([]byte(install.Env), &envs); err != nil {
if err = json.Unmarshal([]byte(install.Env), &envs); err != nil {
return nil, err
}
for _, form := range appForm.FormFields {
@ -602,6 +602,17 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
appParam.Values = form.Values
}
params = append(params, appParam)
} else {
params = append(params, response.AppParam{
Edit: form.Edit,
Key: form.EnvKey,
Rule: form.Rule,
Type: form.Type,
LabelZh: form.LabelZh,
LabelEn: form.LabelEn,
Value: form.Default,
Values: form.Values,
})
}
}

Loading…
Cancel
Save