code refactor

This commit is contained in:
Ulric Qin 2020-12-03 21:11:39 +08:00
parent a8f7f6a04e
commit 80c316201d
1 changed files with 1 additions and 1 deletions

View File

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