mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-21 12:46:03 +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() }()
|
||||
data, err := io.ReadAll(closer)
|
||||
if err != nil {
|
||||
return []byte, err
|
||||
return []byte{}, err
|
||||
}
|
||||
c.Request.Body = io.NopCloser(bytes.NewReader(data))
|
||||
return data, c.ShouldBindJSON(obj)
|
||||
|
Loading…
Reference in New Issue
Block a user