user_router.go
525 字节
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/port/beego/controllers"
)
func init() {
beego.Router("/user/", &controllers.UserController{}, "POST:CreateUser")
beego.Router("/user/:userId", &controllers.UserController{}, "PUT:UpdateUser")
beego.Router("/user/:userId", &controllers.UserController{}, "GET:GetUser")
beego.Router("/user/:userId", &controllers.UserController{}, "DELETE:DeleteUser")
beego.Router("/user/", &controllers.UserController{}, "GET:ListUser")
}