package routers import ( "git.qianqiusoft.com/qianqiusoft/light-apiengine/controllers/gen" "git.qianqiusoft.com/qianqiusoft/light-apiengine/engine" "git.qianqiusoft.com/qianqiusoft/light-apiengine/middleware" ) func init(){ addRegisterHandler(registerOrgRouter) } func registerOrgRouter(e *engine.ApiEngine){ api:=e.GinEngine.Group("/api") v1:=api.Group("/v1") v1.Use(middleware.LoginWare()) ctrler := gen.NewSystemController(e.OrmEngine) v1.GET("/system/get_org_tree", ctrler.GetOrgTree) v1.POST("/system/get_org_tree", ctrler.GetOrgTree) v1.POST("/system/add_org", ctrler.AddOrg) v1.PUT("/system/add_org", ctrler.AddOrg) v1.GET("/system/del_org", ctrler.DelOrg) v1.POST("/system/del_org", ctrler.DelOrg) v1.POST("/system/update_org", ctrler.UpdateOrg) v1.PUT("/system/update_org", ctrler.UpdateOrg) v1.GET("/system/get_org", ctrler.GetOrg) v1.POST("/system/get_org", ctrler.GetOrg) v1.GET("/system/page_org", ctrler.PageOrg) v1.POST("/system/page_org", ctrler.PageOrg) }