user_router.go 1.7 KB
package routers

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

func init() {

	web.Router("/v1/user/company-orgs", &controllers.AuthController{}, "Post:GetCompanyOrgsByUser")
	web.Router("/v1/user/user-info", &controllers.AuthController{}, "Post:GetUserInfo")
	web.Router("/v1/user/user-info-extra", &controllers.AuthController{}, "Post:GetUserInfoExtra")
	web.Router("/v1/user/user-menu", &controllers.AuthController{}, "Post:GetUserMenus")
	web.Router("/v1/user/user-orgs", &controllers.AuthController{}, "Post:GetUserOrg")

	web.Router("/v1/user/change-password", &mobile_client.UserController{}, "Post:ChangePassword")
	web.Router("/v1/user/change-phone", &mobile_client.UserController{}, "Post:ChangePhone")
	web.Router("/v1/user/personal", &mobile_client.UserController{}, "Post:UpdateUserInfo")
	web.Router("/v1/user/destroy-account", &mobile_client.UserController{}, "Post:DestroyAccount")
	web.Router("/v1/user/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers")
	web.Router("/v1/user/msgs", &mobile_client.UserController{}, "Post:Messages")
	web.Router("/v1/user/msgs/mark-read", &mobile_client.UserController{}, "Post:MessagesMarkRead")

	// 特殊处理
	web.Router("/v1/app/orgs/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers")
	web.Router("/v1/web/orgs/department-users", &web_client.OrgController{}, "Post:DepartmentUsers")
}