fix: 解决部分应用参数数据库显示错误的问题 (#6136)

This commit is contained in:
zhengkunwang 2024-08-15 15:12:28 +08:00 committed by GitHub
parent dca3c92d72
commit 5134caa103
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -709,6 +709,22 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
}
}
appParam.Values = form.Values
} else if form.Type == "apps" {
if m, ok := form.Child.(map[string]interface{}); ok {
result := make(map[string]string)
for key, value := range m {
if strVal, ok := value.(string); ok {
result[key] = strVal
}
}
if envKey, ok := result["envKey"]; ok {
serviceName := envs[envKey]
if serviceName != nil {
appInstall, _ := appInstallRepo.GetFirst(appInstallRepo.WithServiceName(serviceName.(string)))
appParam.ShowValue = appInstall.Name
}
}
}
}
params = append(params, appParam)
} else {