优化结构
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"kra/internal/server/handler"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
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)
|
||||
api.POST("/createApi", h.Create)
|
||||
api.POST("/updateApi", h.Update)
|
||||
api.POST("/deleteApi", h.Delete)
|
||||
api.DELETE("/deleteApisByIds", h.DeleteByIDs)
|
||||
api.POST("/getApiById", h.Find)
|
||||
api.GET("/getApiGroups", h.Groups)
|
||||
api.GET("/getApiRoles", h.Roles)
|
||||
api.POST("/setApiRoles", h.SetRoles)
|
||||
api.GET("/syncApi", h.Sync(engine))
|
||||
api.POST("/ignoreApi", h.Ignore)
|
||||
api.POST("/enterSyncApi", h.ApplySync)
|
||||
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