|
|
@@ -13,10 +13,10 @@ type ApiLogController struct {
|
|
|
}
|
|
|
|
|
|
func (c *ApiLogController) BeforeActivation(b mvc.BeforeActivation) {
|
|
|
- b.Handle("GET", "/", "GetList" )
|
|
|
- b.Handle("GET", "/page", "GetPage" )
|
|
|
- b.Handle("GET", "/{reqId:int64}", "GetById" )
|
|
|
- b.Handle("POST", "/add", "Create" )
|
|
|
+ b.Handle("GET", "/", "GetList" )
|
|
|
+ b.Handle("GET", "/page", "GetPage" )
|
|
|
+ b.Handle("GET", "/{reqId:int64}", "GetById" )
|
|
|
+ b.Handle("POST", "/add", "Create" )
|
|
|
}
|
|
|
|
|
|
func (c *ApiLogController) GetList() *JsonResult {
|
|
|
@@ -56,8 +56,8 @@ func (c *ApiLogController) Create() *JsonResult {
|
|
|
return ResultErr("读取数据失败", nil)
|
|
|
}
|
|
|
|
|
|
- req.ReqTime = time.Now()
|
|
|
- req.AccountId = userId
|
|
|
+ req.ReqTime = time.Now()
|
|
|
+ req.AccountId = userId
|
|
|
if err := c.Service.Create(&req); err != nil {
|
|
|
return ResultErr(err.Error(), nil)
|
|
|
} else {
|