package router

import (
	"github.com/gin-gonic/gin"
)

func RegisterUser(group *gin.RouterGroup, handler *User) {
	user := group.Group("/user")
	user.POST("/getUserList", handler.List)
	user.POST("/admin_register", handler.Create)
	user.PUT("/setUserInfo", handler.Update)
	user.PUT("/setSelfInfo", handler.UpdateSelf)
	user.DELETE("/deleteUser", handler.Delete)
	user.POST("/resetPassword", handler.ResetPassword)
	user.POST("/changePassword", handler.ChangePassword)
	user.PUT("/setSelfSetting", handler.SetSelfSetting)
	user.POST("/setUserAuthorities", handler.SetAuthorities)
	user.POST("/setUserAuthority", handler.SwitchAuthority)
	user.GET("/getUserInfo", handler.Get)
}

func RegisterNavigation(group *gin.RouterGroup, handler *Navigation) {
	group.Group("/menu").POST("/getMenu", handler.Menu)
}

func RegisterSession(group *gin.RouterGroup, handler *Session) {
	group.Group("/jwt").POST("/jsonInBlacklist", handler.Logout)
}
