fix: align admin behavior and Kratos integrations
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func RegisterAPI(group *gin.RouterGroup, engine *gin.Engine, h *handler.API) {
|
||||
func RegisterAPI(group, public *gin.RouterGroup, engine *gin.Engine, h *handler.API) {
|
||||
api := group.Group("/api")
|
||||
api.POST("/getApiList", h.List)
|
||||
api.POST("/getAllApis", h.All)
|
||||
@@ -21,7 +21,7 @@ func RegisterAPI(group *gin.RouterGroup, engine *gin.Engine, h *handler.API) {
|
||||
api.GET("/syncApi", h.Sync(engine))
|
||||
api.POST("/ignoreApi", h.Ignore)
|
||||
api.POST("/enterSyncApi", h.ApplySync)
|
||||
api.GET("/freshCasbin", h.FreshCasbin)
|
||||
public.Group("/api").GET("/freshCasbin", h.FreshCasbin)
|
||||
casbin := group.Group("/casbin")
|
||||
casbin.POST("/updateCasbin", h.SetPolicyPaths)
|
||||
casbin.POST("/getPolicyPathByAuthorityId", h.PolicyPaths)
|
||||
|
||||
Reference in New Issue
Block a user