houyaf il y a 3 ans
Parent
commit
a9efe084b9

+ 4 - 4
web/controllers/api_controller.go

@@ -12,11 +12,11 @@ type ApiController struct {
 }
 
 func (c *ApiController) BeforeActivation(b mvc.BeforeActivation) {
-    b.Handle("GET",         "/",                                                        "GetList"       )
-    b.Handle("GET",         "/page",                                                    "GetPage"       )
+    b.Handle("GET",         "/",                                                           "GetList"       )
+    b.Handle("GET",         "/page",                                                       "GetPage"       )
     b.Handle("GET",         "/{moduleId:int64}/{apiId:int64}",                             "GetById"       )
-    b.Handle("POST",        "/add",                                                     "Create"        )
-    b.Handle("PUT",         "/update",                                                  "Update"        )
+    b.Handle("POST",        "/add",                                                        "Create"        )
+    b.Handle("PUT",         "/update",                                                     "Update"        )
     b.Handle("PUT",         "/updateStatus/{moduleId:int64}/{apiId:int64}/{status:int64}", "UpdateStatus"  )
     b.Handle("DELETE",      "/{moduleId:int64}/{apiId:int64}",                             "DeleteByID"    )
 }

+ 1 - 1
web/controllers/api_gateway_controller.go

@@ -78,7 +78,7 @@ func (c *ApiGatewayController) Update(apiCode string)*JsonResult {
     }
 }
 
-func (c *ApiGatewayController) Patch(apiCode string)*JsonResult{
+func (c *ApiGatewayController) Patch(apiCode string)*JsonResult {
     m, err := c.GetJsonData()
     if err != nil {
         return ResultErr(err.Error(), nil)