user_router.go
727 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/port/beego/controllers"
)
func init() {
web.Router("/users/", &controllers.UserController{}, "Post:CreateUser")
web.Router("/users/:userId", &controllers.UserController{}, "Put:UpdateUser")
web.Router("/users/:userId", &controllers.UserController{}, "Get:GetUser")
web.Router("/users/:userId", &controllers.UserController{}, "Delete:RemoveUser")
web.Router("/users/", &controllers.UserController{}, "Get:ListUser")
web.Router("/users/convert-user-status", &controllers.UserController{}, "Post:ConvertUserStatus")
web.Router("/users/set-permission", &controllers.UserController{}, "Post:SetPermission")
}