mirror of
https://github.com/datarhei/core.git
synced 2025-11-03 02:23:42 +08:00
Remove bottlenecks in process handling, still some rough edges
This commit is contained in:
@@ -241,7 +241,7 @@ func (h *ClusterHandler) convertStoreProcessToAPIProcess(p store.Process, filter
|
||||
|
||||
if filter.config {
|
||||
config := &api.ProcessConfig{}
|
||||
config.Unmarshal(p.Config)
|
||||
config.Unmarshal(p.Config, p.Metadata)
|
||||
|
||||
process.Config = config
|
||||
}
|
||||
@@ -442,7 +442,7 @@ func (h *ClusterHandler) ProcessUpdate(c echo.Context) error {
|
||||
}
|
||||
|
||||
// Prefill the config with the current values
|
||||
process.Unmarshal(current.Config)
|
||||
process.Unmarshal(current.Config, current.Metadata)
|
||||
|
||||
if err := util.ShouldBindJSON(c, &process); err != nil {
|
||||
return api.Err(http.StatusBadRequest, "", "invalid JSON: %s", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user