You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
699 B

  1. package router
  2. import (
  3. "gin-vue-admin/api/v1"
  4. "gin-vue-admin/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func InitUserRouter(Router *gin.RouterGroup) {
  8. UserRouter := Router.Group("user").
  9. Use(middleware.JWTAuth()).
  10. Use(middleware.CasbinHandler()).
  11. Use(middleware.OperationRecord())
  12. {
  13. UserRouter.POST("changePassword", v1.ChangePassword) // 修改密码
  14. UserRouter.POST("getUserList", v1.GetUserList) // 分页获取用户列表
  15. UserRouter.POST("setUserAuthority", v1.SetUserAuthority) // 设置用户权限
  16. UserRouter.DELETE("deleteUser", v1.DeleteUser) // 删除用户
  17. UserRouter.PUT("setUserInfo", v1.SetUserInfo) // 设置用户信息
  18. }
  19. }