Can now change all configuration options per instance

This commit is contained in:
2026-06-06 18:09:07 -05:00
parent 336973443d
commit c3e17f9a80
6 changed files with 24 additions and 32 deletions

View File

@@ -193,11 +193,10 @@ func (ds *DaemonServer) handleCreate(w http.ResponseWriter, r *http.Request) {
}
}
options := VsServerConfigOptions{
metadata := InstanceMetadata{
Version: version,
ServerName: name,
Port: converted_port,
MaxClients: 10,
}
err = DownloadAndExtractServer(version, ds.cfg.Storage.InstallDir)
@@ -206,13 +205,13 @@ func (ds *DaemonServer) handleCreate(w http.ResponseWriter, r *http.Request) {
return
}
err = CreateNewInstance(name, version, options, ds.cfg)
err = CreateNewInstance(name, version, metadata, ds.cfg)
if err != nil {
http.Error(w, fmt.Sprintf("Instance provisioning failed: %v", err), http.StatusInternalServerError)
return
}
ds.cfg.Instances[name] = options
ds.cfg.Instances[name] = metadata
data, err := json.MarshalIndent(ds.cfg, "", " ")
if err != nil {