diff --git a/http/api/process.go b/http/api/process.go index 5cfb57bb..3738d40a 100644 --- a/http/api/process.go +++ b/http/api/process.go @@ -309,6 +309,7 @@ func (cfg *ProcessConfig) Unmarshal(c *app.Config, metadata map[string]interface io := ProcessConfigIO{ ID: x.ID, Address: x.Address, + Cleanup: []ProcessConfigIOCleanup{}, } io.Options = make([]string, len(x.Options)) @@ -321,6 +322,7 @@ func (cfg *ProcessConfig) Unmarshal(c *app.Config, metadata map[string]interface io := ProcessConfigIO{ ID: x.ID, Address: x.Address, + Cleanup: []ProcessConfigIOCleanup{}, } io.Options = make([]string, len(x.Options)) diff --git a/http/handler/api/fixtures/addProcessInvalidType.json b/http/handler/api/fixtures/addProcessInvalidType.json index ef7312d6..a475baa7 100644 --- a/http/handler/api/fixtures/addProcessInvalidType.json +++ b/http/handler/api/fixtures/addProcessInvalidType.json @@ -29,4 +29,4 @@ "reconnect": true, "reconnect_delay_seconds": 10, "stale_timeout_seconds": 10 -} +} \ No newline at end of file diff --git a/http/handler/api/fixtures/addProcessMissingField.json b/http/handler/api/fixtures/addProcessMissingField.json index b216773e..22214da5 100644 --- a/http/handler/api/fixtures/addProcessMissingField.json +++ b/http/handler/api/fixtures/addProcessMissingField.json @@ -28,4 +28,4 @@ "reconnect": true, "reconnect_delay_seconds": 10, "stale_timeout_seconds": 10 -} +} \ No newline at end of file diff --git a/http/handler/api/fixtures/removeProcess.json b/http/handler/api/fixtures/removeProcess.json index b967e245..59c7f5cf 100644 --- a/http/handler/api/fixtures/removeProcess.json +++ b/http/handler/api/fixtures/removeProcess.json @@ -29,4 +29,4 @@ "reconnect": true, "reconnect_delay_seconds": 10, "stale_timeout_seconds": 10 -} +} \ No newline at end of file diff --git a/http/handler/api/process.go b/http/handler/api/process.go index 0deed321..d8b15bdc 100644 --- a/http/handler/api/process.go +++ b/http/handler/api/process.go @@ -354,7 +354,9 @@ func (h *ProcessHandler) Update(c echo.Context) error { h.restream.SetProcessMetadata(tid, key, data) } - return c.JSON(http.StatusOK, process) + p, _ := h.getProcess(tid, newFilter("config")) + + return c.JSON(http.StatusOK, p.Config) } // Command issues a command to a process