user_router.go 1.3 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/port/beego/controllers"
)

func init() {
	web.Router("/user/", &controllers.UserController{}, "Post:CreateUser")
	web.Router("/user/:userId", &controllers.UserController{}, "Put:UpdateUser")
	web.Router("/user/:userId", &controllers.UserController{}, "Get:GetUser")
	web.Router("/user/:userId", &controllers.UserController{}, "Delete:RemoveUser")
	web.Router("/user/search", &controllers.UserController{}, "Post:SearchUser")
	web.Router("/user/:userId/access-menus", &controllers.UserController{}, "Get:GetUserAccessMenus")
	web.Router("/user/:userId/profile", &controllers.UserController{}, "Get:GetUserProfile")
	//web.Router("/user/batch-add", &controllers.UserController{}, "Post:BatchAdd")
	web.Router("/user/batch-add2", &controllers.UserController{}, "Post:BatchAdd2")
	web.Router("/user/batch-enable", &controllers.UserController{}, "Post:BatchEnable")
	web.Router("/user/batch-reset-password", &controllers.UserController{}, "Post:BatchResetPassword")
	web.Router("/user/:userId/base-info", &controllers.UserController{}, "Put:UpdateUsersBase")
	web.Router("/user/cooperator", &controllers.UserController{}, "Post:CreateCooperator")
	web.Router("/user/cooperator/:userId", &controllers.UserController{}, "Put:UpdateCooperator")
}