employee_router.go
586 字节
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/port/beego/controllers"
)
func init() {
beego.Router("/employees/", &controllers.EmployeeController{}, "Post:CreateEmployee")
beego.Router("/employees/:uid", &controllers.EmployeeController{}, "Put:UpdateEmployee")
beego.Router("/employees/:uid", &controllers.EmployeeController{}, "Get:GetEmployee")
beego.Router("/employees/:uid", &controllers.EmployeeController{}, "Delete:RemoveEmployee")
beego.Router("/employees/", &controllers.EmployeeController{}, "Get:ListEmployee")
}