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.

19 lines
492 B

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