fix: "Inpaint" code error

This commit is contained in:
CaIon 2024-03-13 23:17:12 +08:00
parent 6ec45751fd
commit da55c56c54

View File

@ -494,8 +494,10 @@ func RelayMidjourneySubmit(c *gin.Context, relayMode int) *dto.MidjourneyRespons
}
}
//修改返回值
newBody := strings.Replace(string(responseBody), `"code":21`, `"code":1`, -1)
responseBody = []byte(newBody)
if midjRequest.Action != constant.MjActionInPaintPre {
newBody := strings.Replace(string(responseBody), `"code":21`, `"code":1`, -1)
responseBody = []byte(newBody)
}
}
err = midjourneyTask.Insert()