Update distributor.go

This commit is contained in:
luxl 2023-11-18 16:26:12 +08:00 committed by GitHub
parent 98326bcdb4
commit f784f232c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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