Update distributor.go

This commit is contained in:
luxl
2023-11-18 16:26:12 +08:00
committed by GitHub
parent 98326bcdb4
commit f784f232c2

View File

@@ -46,8 +46,9 @@ func Distribute() func(c *gin.Context) {
if modelRequest.Model == "" { if modelRequest.Model == "" {
modelRequest.Model = "midjourney" modelRequest.Model = "midjourney"
} }
} else {
err = common.UnmarshalBodyReusable(c, &modelRequest)
} }
err = common.UnmarshalBodyReusable(c, &modelRequest)
if err != nil { if err != nil {
abortWithMessage(c, http.StatusBadRequest, "无效的请求") abortWithMessage(c, http.StatusBadRequest, "无效的请求")
return return