正在显示
1 个修改的文件
包含
1 行增加
和
5 行删除
| @@ -21,11 +21,6 @@ type BaseController struct { | @@ -21,11 +21,6 @@ type BaseController struct { | ||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | func (controller BaseController) BindJsonData(v interface{}) error { | 23 | func (controller BaseController) BindJsonData(v interface{}) error { |
| 24 | - // bodyData := controller.Ctx.Input.GetData("requestBody") | ||
| 25 | - // bodyByte, ok := bodyData.([]byte) | ||
| 26 | - // if !ok { | ||
| 27 | - // return errors.New("requestBody is not []byte") | ||
| 28 | - // } | ||
| 29 | return json.Unmarshal(controller.Ctx.Input.RequestBody, v) | 24 | return json.Unmarshal(controller.Ctx.Input.RequestBody, v) |
| 30 | } | 25 | } |
| 31 | 26 | ||
| @@ -187,5 +182,6 @@ func (controller *BaseController) GetUserId() int64 { | @@ -187,5 +182,6 @@ func (controller *BaseController) GetUserId() int64 { | ||
| 187 | } | 182 | } |
| 188 | 183 | ||
| 189 | func (controller *BaseController) setUserId(id int64) { | 184 | func (controller *BaseController) setUserId(id int64) { |
| 185 | + logs.Info("token:admin_user_id = ", id) | ||
| 190 | controller.Ctx.Input.SetData("token:admin_user_id", id) | 186 | controller.Ctx.Input.SetData("token:admin_user_id", id) |
| 191 | } | 187 | } |
-
请 注册 或 登录 后发表评论