Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Mar 15, 2020
1 parent 9abf147 commit 7c8091d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func userRouter(router *gin.Engine) {
c.JSON(200, controller.CreateUser(username, password))
})
user.DELETE("", func(c *gin.Context) {
stringId := c.PostForm("id")
stringId := c.Query("id")
id, _ := strconv.Atoi(stringId)
c.JSON(200, controller.DelUser(uint(id)))
})
Expand All @@ -39,7 +39,7 @@ func dataRouter(router *gin.Engine) {
c.JSON(200, controller.SetData(uint(id), quota))
})
data.DELETE("", func(c *gin.Context) {
sID := c.PostForm("id")
sID := c.Query("id")
id, _ := strconv.Atoi(sID)
c.JSON(200, controller.CleanData(uint(id)))
})
Expand Down

0 comments on commit 7c8091d

Please sign in to comment.