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.

17 lines
585 B

  1. package router
  2. import (
  3. "gin-vue-admin/controller/api"
  4. "gin-vue-admin/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func InitUserRouter(Router *gin.RouterGroup) {
  8. UserRouter := Router.Group("user").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
  9. {
  10. UserRouter.POST("changePassword", api.ChangePassword) // 修改密码
  11. UserRouter.POST("uploadHeaderImg", api.UploadHeaderImg) //上传头像
  12. UserRouter.POST("getUserList", api.GetUserList) // 分页获取用户列表
  13. UserRouter.POST("setUserAuthority", api.SetUserAuthority) //设置用户权限
  14. }
  15. }