From efcfe08c97cbd47ea1b2525dabb8bb0039e20b67 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 7 Jan 2021 10:26:35 +0800 Subject: [PATCH] 1 --- server/admin/usermgr.go | 14 ++++++++++++-- third_party/f5 | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/server/admin/usermgr.go b/server/admin/usermgr.go index d5fdb8b..fc8d090 100644 --- a/server/admin/usermgr.go +++ b/server/admin/usermgr.go @@ -61,8 +61,18 @@ func (this *UserMgr) auth(c *f5.Context) { func (this *UserMgr) _userLogin(c *f5.Context) { url := "https://mp.kingsome.cn/api/user/login" content := q5.NewMxoObject() - content.SetXValue("username", c.Request("username")) - content.SetXValue("password", c.Request("password")) + reqObj := struct { + UserName string `json:"username"` + Password string `json:"password"` + }{} + postBody := c.GetBody().GetString() + if err := json.Unmarshal([]byte(postBody), &reqObj); err != nil{ + c.ResponseErr(500, "服务器内部错误") + return + } + f5.SysLog().Debug("boyd:%s", postBody) + content.SetXValue("username", q5.NewXString(reqObj.UserName)) + content.SetXValue("password", q5.NewXString(reqObj.Password)) respStr := "" if err := q5.HttpPostContent(url, "application/json;charset=utf-8", diff --git a/third_party/f5 b/third_party/f5 index 089d415..b4b8898 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 089d415abc524ea3af32952ea34ff437da56f8ff +Subproject commit b4b8898e1192b286b00ba04628f1f28f7e0b4f13