use ShouldBindJSON not ShouldBind when receive data

This commit is contained in:
Ulric Qin 2020-03-27 14:17:41 +08:00
parent aac5fd1a93
commit 14d1dec45d
1 changed files with 1 additions and 1 deletions

View File

@ -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 {