作者 郑周

优化

... ... @@ -12,7 +12,7 @@ type CycleController struct {
beego.BaseController
}
func (controller *RoleController) CreateCycle() {
func (controller *CycleController) CreateCycle() {
ruService := service.NewEvaluationCycleService()
in := &command.CreateCycleCommand{}
if err := controller.Unmarshal(in); err != nil {
... ...
... ... @@ -12,7 +12,7 @@ type ProjectController struct {
beego.BaseController
}
func (controller *RoleController) CreateProject() {
func (controller *ProjectController) CreateProject() {
ruService := service.NewEvaluationProjectService()
in := &command.CreateProjectCommand{}
if err := controller.Unmarshal(in); err != nil {
... ...
... ... @@ -12,7 +12,7 @@ type RuleController struct {
beego.BaseController
}
func (controller *RoleController) CreateRule() {
func (controller *RuleController) CreateRule() {
ruService := service.NewEvaluationRuleService()
in := &command.CreateRuleCommand{}
if err := controller.Unmarshal(in); err != nil {
... ...
... ... @@ -13,7 +13,7 @@ type TemplateController struct {
beego.BaseController
}
func (controller *RoleController) CreateTemplate() {
func (controller *TemplateController) CreateTemplate() {
ruService := service.NewEvaluationTemplateService()
in := &command.CreateTemplateCommand{}
if err := controller.Unmarshal(in); err != nil {
... ...
... ... @@ -10,8 +10,8 @@ import (
func init() {
ns := web.NewNamespace("/v1/role-user",
web.NSBefore(filters.AllowCors(), middlewares.CheckAdminToken()),
web.NSRouter("/", &controllers.RoleUserController{}, "Post:CreateRole"),
web.NSRouter("/", &controllers.RoleUserController{}, "Delete:RemoveRole"),
web.NSRouter("/", &controllers.RoleUserController{}, "Post:CreateRoleUser"),
web.NSRouter("/", &controllers.RoleUserController{}, "Delete:RemoveRoleUser"),
web.NSRouter("/all", &controllers.RoleUserController{}, "Post:ListRoleUser"),
)
web.AddNamespace(ns)
... ...