✨ init project
This commit is contained in:
19
router/system/sys_casbin.go
Normal file
19
router/system/sys_casbin.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type CasbinRouter struct{}
|
||||
|
||||
func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
|
||||
casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
|
||||
casbinRouterWithoutRecord := Router.Group("casbin")
|
||||
{
|
||||
casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
|
||||
}
|
||||
{
|
||||
casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user