fix bug
This commit is contained in:
parent
26f9d25860
commit
e6bb113f35
@ -46,14 +46,7 @@ func Distribute() func(c *gin.Context) {
|
|||||||
if modelRequest.Model == "" {
|
if modelRequest.Model == "" {
|
||||||
modelRequest.Model = "midjourney"
|
modelRequest.Model = "midjourney"
|
||||||
}
|
}
|
||||||
} else {
|
} else if !strings.HasPrefix(c.Request.URL.Path, "/v1/audio") {
|
||||||
err := common.UnmarshalBodyReusable(c, &modelRequest)
|
|
||||||
if err != nil {
|
|
||||||
abortWithMessage(c, http.StatusBadRequest, "无效的请求")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !strings.HasPrefix(c.Request.URL.Path, "/v1/audio") {
|
|
||||||
err = common.UnmarshalBodyReusable(c, &modelRequest)
|
err = common.UnmarshalBodyReusable(c, &modelRequest)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user