mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-06-02 13:07:14 +00:00
Merge pull request #1779 from feitianbubu/pr/fix-video-get-task
fix: get video task err when Content-Type=json
This commit is contained in:
@@ -169,6 +169,9 @@ func getModelRequest(c *gin.Context) (*ModelRequest, bool, error) {
|
|||||||
relayMode := relayconstant.RelayModeUnknown
|
relayMode := relayconstant.RelayModeUnknown
|
||||||
if c.Request.Method == http.MethodPost {
|
if c.Request.Method == http.MethodPost {
|
||||||
err = common.UnmarshalBodyReusable(c, &modelRequest)
|
err = common.UnmarshalBodyReusable(c, &modelRequest)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, errors.New("video无效的请求, " + err.Error())
|
||||||
|
}
|
||||||
relayMode = relayconstant.RelayModeVideoSubmit
|
relayMode = relayconstant.RelayModeVideoSubmit
|
||||||
} else if c.Request.Method == http.MethodGet {
|
} else if c.Request.Method == http.MethodGet {
|
||||||
relayMode = relayconstant.RelayModeVideoFetchByID
|
relayMode = relayconstant.RelayModeVideoFetchByID
|
||||||
|
|||||||
Reference in New Issue
Block a user