use ShouldBindJSON not ShouldBind

This commit is contained in:
Ulric Qin 2020-03-27 14:18:40 +08:00
parent 14d1dec45d
commit 484480348b
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,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 {