mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-21 20:56:04 +03:00
fix for BuildJSONWithRaw
This commit is contained in:
parent
7f0709888c
commit
4bca4c491e
@ -291,7 +291,7 @@ func BindJSONWithRaw(c *gin.Context, obj any) ([]byte, error) {
|
|||||||
defer func() { _ = closer.Close() }()
|
defer func() { _ = closer.Close() }()
|
||||||
data, err := io.ReadAll(closer)
|
data, err := io.ReadAll(closer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []byte, err
|
return []byte{}, err
|
||||||
}
|
}
|
||||||
c.Request.Body = io.NopCloser(bytes.NewReader(data))
|
c.Request.Body = io.NopCloser(bytes.NewReader(data))
|
||||||
return data, c.ShouldBindJSON(obj)
|
return data, c.ShouldBindJSON(obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user