...
|
...
|
@@ -21,11 +21,6 @@ type BaseController struct { |
|
|
}
|
|
|
|
|
|
func (controller BaseController) BindJsonData(v interface{}) error {
|
|
|
// bodyData := controller.Ctx.Input.GetData("requestBody")
|
|
|
// bodyByte, ok := bodyData.([]byte)
|
|
|
// if !ok {
|
|
|
// return errors.New("requestBody is not []byte")
|
|
|
// }
|
|
|
return json.Unmarshal(controller.Ctx.Input.RequestBody, v)
|
|
|
}
|
|
|
|
...
|
...
|
@@ -187,5 +182,6 @@ func (controller *BaseController) GetUserId() int64 { |
|
|
}
|
|
|
|
|
|
func (controller *BaseController) setUserId(id int64) {
|
|
|
logs.Info("token:admin_user_id = ", id)
|
|
|
controller.Ctx.Input.SetData("token:admin_user_id", id)
|
|
|
} |
...
|
...
|
|