From 80c316201dbe423c65bd59f2e4f2a13bf0710cb8 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 3 Dec 2020 21:11:39 +0800 Subject: [PATCH] code refactor --- src/modules/monapi/http/router_stra.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/monapi/http/router_stra.go b/src/modules/monapi/http/router_stra.go index b80fa11f..85516715 100644 --- a/src/modules/monapi/http/router_stra.go +++ b/src/modules/monapi/http/router_stra.go @@ -11,7 +11,7 @@ import ( func straPost(c *gin.Context) { username := loginUsername(c) stra := new(models.Stra) - errors.Dangerous(c.ShouldBind(stra)) + errors.Dangerous(c.ShouldBindJSON(stra)) can, err := models.UsernameCandoNodeOp(username, "mon_stra_create", stra.Nid) errors.Dangerous(err)