feat: 允许开关mj回调

This commit is contained in:
CaIon
2024-03-14 21:21:37 +08:00
parent 643622eb56
commit cee6f9c3f5
4 changed files with 30 additions and 9 deletions
+3 -1
View File
@@ -163,7 +163,9 @@ func DoMidjourneyHttpRequest(c *gin.Context, timeout time.Duration, fullRequestU
return MidjourneyErrorWithStatusCodeWrapper(constant.MjErrorUnknown, "read_request_body_failed", http.StatusInternalServerError), nullBytes, err
}
delete(mapResult, "accountFilter")
delete(mapResult, "notifyHook")
if !constant.MjNotifyEnabled {
delete(mapResult, "notifyHook")
}
//req, err := http.NewRequest(c.Request.Method, fullRequestURL, requestBody)
// make new request with mapResult
reqBody, err := json.Marshal(mapResult)