use ShouldBindJSON not ShouldBind when receive data
This commit is contained in:
parent
aac5fd1a93
commit
14d1dec45d
|
@ -38,7 +38,7 @@ func pushData(c *gin.Context) {
|
|||
recvMetricValues := []*dataobj.MetricValue{}
|
||||
metricValues := []*dataobj.MetricValue{}
|
||||
|
||||
errors.Dangerous(c.ShouldBind(&recvMetricValues))
|
||||
errors.Dangerous(c.ShouldBindJSON(&recvMetricValues))
|
||||
|
||||
var msg string
|
||||
for _, v := range recvMetricValues {
|
||||
|
|
Loading…
Reference in New Issue