Refactor instance management and configuration handling

This commit is contained in:
2025-07-19 21:10:27 +02:00
parent 3428089bec
commit 301e170974
7 changed files with 102 additions and 78 deletions

View File

@@ -127,7 +127,7 @@ func (h *Handler) CreateInstance() http.HandlerFunc {
return
}
var options InstanceOptions
var options CreateInstanceRequest
if err := json.NewDecoder(r.Body).Decode(&options); err != nil {
http.Error(w, "Invalid request body", http.StatusBadRequest)
return
@@ -199,7 +199,7 @@ func (h *Handler) UpdateInstance() http.HandlerFunc {
return
}
var options InstanceOptions
var options CreateInstanceRequest
if err := json.NewDecoder(r.Body).Decode(&options); err != nil {
http.Error(w, "Invalid request body", http.StatusBadRequest)
return