users_router.go
831 字节
package routers
import (
"github.com/astaxie/beego"
"github.com/tiptok/godevp/pkg/port/beego/controllers"
)
func init() {
//beego.Router("/v1/user/", &controllers.UsersController{}, "Post:CreateUsers")
//beego.Router("/v1/user/:Id", &controllers.UsersController{}, "Put:UpdateUsers")
//beego.Router("/v1/user/:Id", &controllers.UsersController{}, "Get:GetUsers")
//beego.Router("/v1/user/:Id", &controllers.UsersController{}, "Delete:RemoveUsers")
//beego.Router("/v1/user/", &controllers.UsersController{}, "Get:ListUsers")
controller := &controllers.UsersController{}
beego.Post("/v1/user/", controller.CreateUsers)
beego.Put("/v1/user/:Id", controller.UpdateUsers)
beego.Get("/v1/user/:Id", controller.GetUsers)
beego.Delete("/v1/user/:Id", controller.RemoveUsers)
beego.Get("/v1/user/", controller.ListUsers)
}