|
@@ -204,7 +204,9 @@ func ValidateBasicTaskRequest(c *gin.Context, info *RelayInfo, action string) *d
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return createTaskError(err, "invalid_multipart_form", http.StatusBadRequest, true)
|
|
return createTaskError(err, "invalid_multipart_form", http.StatusBadRequest, true)
|
|
|
}
|
|
}
|
|
|
- } else if err := common.UnmarshalBodyReusable(c, &req); err != nil {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ // 为了metadata字段的兼容性,统一UnmarshalBodyReusable
|
|
|
|
|
+ if err := common.UnmarshalBodyReusable(c, &req); err != nil {
|
|
|
return createTaskError(err, "invalid_request", http.StatusBadRequest, true)
|
|
return createTaskError(err, "invalid_request", http.StatusBadRequest, true)
|
|
|
}
|
|
}
|
|
|
|
|
|