Commit da55c56c by CaIon

fix: "Inpaint" code error

parent 6ec45751
...@@ -494,9 +494,11 @@ func RelayMidjourneySubmit(c *gin.Context, relayMode int) *dto.MidjourneyRespons ...@@ -494,9 +494,11 @@ func RelayMidjourneySubmit(c *gin.Context, relayMode int) *dto.MidjourneyRespons
} }
} }
//修改返回值 //修改返回值
if midjRequest.Action != constant.MjActionInPaintPre {
newBody := strings.Replace(string(responseBody), `"code":21`, `"code":1`, -1) newBody := strings.Replace(string(responseBody), `"code":21`, `"code":1`, -1)
responseBody = []byte(newBody) responseBody = []byte(newBody)
} }
}
err = midjourneyTask.Insert() err = midjourneyTask.Insert()
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment