From d767a3d57704d5a41a24c9d9cd54ff019040eecd Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 23 Jul 2025 21:57:52 +0200 Subject: [PATCH] Remove instance restart from update handler --- server/pkg/handlers.go | 6 ------ ui/src/lib/api.ts | 14 +++++++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/server/pkg/handlers.go b/server/pkg/handlers.go index ffdbd0d..78c90a1 100644 --- a/server/pkg/handlers.go +++ b/server/pkg/handlers.go @@ -213,12 +213,6 @@ func (h *Handler) UpdateInstance() http.HandlerFunc { return } - instance, err = h.InstanceManager.RestartInstance(name) - if err != nil { - http.Error(w, "Failed to restart instance: "+err.Error(), http.StatusInternalServerError) - return - } - w.Header().Set("Content-Type", "application/json") if err := json.NewEncoder(w).Encode(instance); err != nil { http.Error(w, "Failed to encode instance: "+err.Error(), http.StatusInternalServerError) diff --git a/ui/src/lib/api.ts b/ui/src/lib/api.ts index 7c97d9e..24be12e 100644 --- a/ui/src/lib/api.ts +++ b/ui/src/lib/api.ts @@ -3,16 +3,16 @@ import { CreateInstanceOptions, Instance } from "@/types/instance" const API_BASE = '/api/v1' // Configuration for API calls -interface ApiConfig { - apiKey?: string -} +// interface ApiConfig { +// apiKey?: string +// } // Global config - can be updated when auth is added -let apiConfig: ApiConfig = {} +// let apiConfig: ApiConfig = {} -export const setApiConfig = (config: ApiConfig) => { - apiConfig = config -} +// export const setApiConfig = (config: ApiConfig) => { +// apiConfig = config +// } // Base API call function with error handling async function apiCall(