mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-13 01:23:41 +08:00
feat: support shorten
This commit is contained in:
@@ -263,6 +263,10 @@ func UpdateMidjourneyTaskBulk() {
|
||||
task.ImageUrl = responseItem.ImageUrl
|
||||
task.Status = responseItem.Status
|
||||
task.FailReason = responseItem.FailReason
|
||||
if responseItem.Properties != nil {
|
||||
propertiesStr, _ := json.Marshal(responseItem.Properties)
|
||||
task.Properties = string(propertiesStr)
|
||||
}
|
||||
if responseItem.Buttons != nil {
|
||||
buttonStr, _ := json.Marshal(responseItem.Buttons)
|
||||
task.Buttons = string(buttonStr)
|
||||
|
||||
@@ -68,6 +68,9 @@ func RelayMidjourney(c *gin.Context) {
|
||||
} else if strings.HasPrefix(c.Request.URL.Path, "/mj/submit/modal") {
|
||||
// midjourney plus
|
||||
relayMode = relayconstant.RelayModeMidjourneyModal
|
||||
} else if strings.HasPrefix(c.Request.URL.Path, "/mj/submit/shorten") {
|
||||
// midjourney plus
|
||||
relayMode = relayconstant.RelayModeMidjourneyShorten
|
||||
} else if strings.HasPrefix(c.Request.URL.Path, "/mj/submit/imagine") {
|
||||
relayMode = relayconstant.RelayModeMidjourneyImagine
|
||||
} else if strings.HasPrefix(c.Request.URL.Path, "/mj/submit/blend") {
|
||||
|
||||
Reference in New Issue
Block a user