This commit is contained in:
2023-05-26 04:19:29 +08:00
parent 7531e39a83
commit 36aa839991
2 changed files with 1 additions and 23 deletions

View File

@@ -31,6 +31,7 @@ func ServersGet(w http.ResponseWriter, r *http.Request) {
// 讀取模型信息
resp, err = http.Get(fmt.Sprintf("http://%s:%d/sdapi/v1/sd-models", server.IP, server.Port))
if err != nil || resp.StatusCode != http.StatusOK {
server.Models = []map[string]interface{}{}
} else {
var models []map[string]interface{}
body, _ := ioutil.ReadAll(resp.Body)