From 65e7294c724a0d4d9197e63bbd4ded71f8ca0b24 Mon Sep 17 00:00:00 2001 From: Jrohy Date: Sun, 29 Mar 2020 17:58:18 +0800 Subject: [PATCH] fix bug --- web/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/auth.go b/web/auth.go index 78cd1c8f..b6d9d4c7 100644 --- a/web/auth.go +++ b/web/auth.go @@ -98,7 +98,7 @@ func init() { func updateUser(c *gin.Context) { responseBody := controller.ResponseBody{Msg: "success"} defer controller.TimeCost(time.Now(), &responseBody) - username := c.PostForm("username") + username := c.DefaultPostForm("username", "admin") pass := c.PostForm("password") err := core.SetValue(fmt.Sprintf("%s_pass", username), pass) if err != nil {