Remove instance restart from update handler

This commit is contained in:
2025-07-23 21:57:52 +02:00
parent f2a2e8179e
commit d767a3d577
2 changed files with 7 additions and 13 deletions

View File

@@ -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)

View File

@@ -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<T>(