路由分拆

This commit is contained in:
2023-04-28 16:53:23 +08:00
parent bb58879595
commit 95107e7bdc
10 changed files with 457 additions and 345 deletions

15
routers/params.go Normal file
View File

@@ -0,0 +1,15 @@
package routers
import (
"main/utils"
"net/http"
)
func ParamsModelsGet(w http.ResponseWriter, r *http.Request) {
params := make(map[string]interface{})
params["type"] = []string{"lora", "ckp", "hyper", "ti"}
params["status"] = []string{"pending", "running", "finished", "failed"}
params["base_model"] = []string{"SD1.5", "SD2"}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Write(utils.ToJSON(params))
}