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
628 B

3 years ago
3 years ago
3 years ago
  1. package system
  2. import (
  3. v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type CasbinRouter struct{}
  8. func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
  9. casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
  10. casbinRouterWithoutRecord := Router.Group("casbin")
  11. casbinApi := v1.ApiGroupApp.SystemApiGroup.CasbinApi
  12. {
  13. casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
  14. }
  15. {
  16. casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
  17. }
  18. }