...
|
...
|
@@ -10,13 +10,18 @@ import ( |
|
|
|
|
|
func init() {
|
|
|
nsV1 := beego.NewNamespace("v1",
|
|
|
beego.NSBefore(middleware.AllowOption),
|
|
|
beego.NSBefore(middleware.LogRequestData, middleware.AuthToken),
|
|
|
beego.NSNamespace("/company",
|
|
|
beego.NSRouter("/:companyid/department", &controllers.CompanyController{}, "get:DepartmentList"),
|
|
|
beego.NSRouter("/department/:id", &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("/:companyid/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("/rbac",
|
|
|
beego.NSRouter("/role", &controllers.RbacController{}, "post:RoleAdd"),
|
...
|
...
|
@@ -25,6 +30,7 @@ func init() { |
|
|
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/role", &controllers.RbacController{}, "get:RoleList"),
|
|
|
),
|
|
|
)
|
|
|
|
...
|
...
|
|