mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-16 05:00:43 +08:00
调整权限
This commit is contained in:
@@ -39,7 +39,14 @@ func initRouter() *gin.Engine {
|
||||
|
||||
c.FileFromFS("static"+filepath, staticHttpFs)
|
||||
})
|
||||
|
||||
router.GET("/api/admin/apiList", func(ctx *gin.Context) {
|
||||
var path = []string{}
|
||||
for _, route := range router.Routes() {
|
||||
// fmt.Printf("%s 127.0.0.1:%v%s\n", route.Method, config.Config.ServerPort, route.Path)
|
||||
path = append(path, route.Path)
|
||||
}
|
||||
response.Result(ctx, response.Success, path)
|
||||
})
|
||||
// 设置中间件
|
||||
router.Use(gin.Logger(), middleware.Cors(), middleware.ErrorRecover())
|
||||
// 演示模式
|
||||
@@ -54,10 +61,6 @@ func initRouter() *gin.Engine {
|
||||
|
||||
routers.RegisterGroup(group)
|
||||
|
||||
for _, route := range router.Routes() {
|
||||
fmt.Printf("%s %s\n", route.Method, route.Path)
|
||||
}
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user