...
|
...
|
@@ -13,25 +13,26 @@ func init() { |
|
|
beego.NSBefore(middleware.AllowOption),
|
|
|
beego.NSBefore(middleware.LogRequestData),
|
|
|
beego.NSBefore(middleware.AuthToken),
|
|
|
beego.NSNamespace("/company",
|
|
|
beego.NSRouter("/department", &controllers.CompanyController{}, "get:DepartmentList"),
|
|
|
beego.NSRouter("/department/:id([0-9]+)", &controllers.CompanyController{}, "get:DepartmentOne"),
|
|
|
beego.NSRouter("/department", &controllers.CompanyController{}, "post:DepartmentAdd"),
|
|
|
beego.NSRouter("/department", &controllers.CompanyController{}, "put:DepartmentUpdate"),
|
|
|
beego.NSRouter("/department", &controllers.CompanyController{}, "delete:DepartmentDelete"),
|
|
|
beego.NSRouter("/position", &controllers.CompanyController{}, "get:PositionList"),
|
|
|
beego.NSRouter("/position", &controllers.CompanyController{}, "post:PositionAdd"),
|
|
|
beego.NSRouter("/position", &controllers.CompanyController{}, "put:PositionEdit"),
|
|
|
beego.NSRouter("/position", &controllers.CompanyController{}, "delete:PositionDelete"),
|
|
|
beego.NSNamespace("/department",
|
|
|
beego.NSRouter("/list", &controllers.CompanyController{}, "get:DepartmentList"),
|
|
|
beego.NSRouter("/add", &controllers.CompanyController{}, "post:DepartmentAdd"),
|
|
|
beego.NSRouter("/edit", &controllers.CompanyController{}, "post:DepartmentUpdate"),
|
|
|
beego.NSRouter("/delete", &controllers.CompanyController{}, "post:DepartmentDelete"),
|
|
|
),
|
|
|
beego.NSNamespace("position",
|
|
|
beego.NSRouter("/list", &controllers.CompanyController{}, "get:PositionList"),
|
|
|
beego.NSRouter("/add", &controllers.CompanyController{}, "post:PositionAdd"),
|
|
|
beego.NSRouter("/edit", &controllers.CompanyController{}, "post:PositionEdit"),
|
|
|
beego.NSRouter("/delete", &controllers.CompanyController{}, "post:PositionDelete"),
|
|
|
),
|
|
|
beego.NSNamespace("/rbac",
|
|
|
beego.NSRouter("/role", &controllers.RbacController{}, "post:RoleAdd"),
|
|
|
beego.NSRouter("/role", &controllers.RbacController{}, "put:RoleUpdate"),
|
|
|
beego.NSRouter("/role", &controllers.RbacController{}, "delete:RoleDelete"),
|
|
|
beego.NSRouter("/role_group", &controllers.RbacController{}, "post:RoleGroupAdd"),
|
|
|
beego.NSRouter("/role_group", &controllers.RbacController{}, "put:RoleGroupUpdate"),
|
|
|
beego.NSRouter("/role_group", &controllers.RbacController{}, "delete:RoleGroupDelete"),
|
|
|
beego.NSRouter("/:companyid([0-9]+)/role", &controllers.RbacController{}, "get:RoleList"),
|
|
|
beego.NSRouter("/role/add", &controllers.RbacController{}, "post:RoleAdd"),
|
|
|
beego.NSRouter("/role/edit", &controllers.RbacController{}, "post:RoleUpdate"),
|
|
|
beego.NSRouter("/role/delete", &controllers.RbacController{}, "post:RoleDelete"),
|
|
|
beego.NSRouter("/role_group/add", &controllers.RbacController{}, "post:RoleGroupAdd"),
|
|
|
beego.NSRouter("/role_group/edit", &controllers.RbacController{}, "post:RoleGroupUpdate"),
|
|
|
beego.NSRouter("/role_group/delete", &controllers.RbacController{}, "post:RoleGroupDelete"),
|
|
|
beego.NSRouter("/role", &controllers.RbacController{}, "get:RoleList"),
|
|
|
),
|
|
|
beego.NSNamespace("/auth",
|
|
|
beego.NSRouter("/change_company", &controllers.AuthController{}, "post:ChangeCompany"),
|
...
|
...
|
|