wangpengfei
2023-08-25 25c573d55986e02cf5f70cc3868e2b94a4be98e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package system
 
import (
    "github.com/gin-gonic/gin"
    v1 "srm/api/v1"
    "srm/middleware"
)
 
type CasbinRouter struct{}
 
func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
    casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
    casbinRouterWithoutRecord := Router.Group("casbin")
    casbinApi := v1.ApiGroupApp.SystemApiGroup.CasbinApi
    {
        casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
    }
    {
        casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
    }
}