路由分拆
This commit is contained in:
15
routers/params.go
Normal file
15
routers/params.go
Normal 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))
|
||||
}
|
Reference in New Issue
Block a user