fix bug.
This commit is contained in:
parent
0318f345b4
commit
ac31c7ed97
@ -1,8 +1,6 @@
|
|||||||
package dashboard
|
package dashboard
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ferry/apis/dashboard"
|
|
||||||
"ferry/middleware"
|
|
||||||
jwt "ferry/pkg/jwtauth"
|
jwt "ferry/pkg/jwtauth"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -13,8 +11,8 @@ import (
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
func RegisterDashboardRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
func RegisterDashboardRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||||
classify := v1.Group("/dashboard").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
//classify := v1.Group("/dashboard").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
||||||
{
|
//{
|
||||||
classify.GET("", dashboard.InitData)
|
// classify.GET("", dashboard.InitData)
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"ferry/apis/dashboard"
|
||||||
"ferry/apis/monitor"
|
"ferry/apis/monitor"
|
||||||
"ferry/apis/system"
|
"ferry/apis/system"
|
||||||
"ferry/handler"
|
"ferry/handler"
|
||||||
"ferry/pkg/jwtauth"
|
"ferry/pkg/jwtauth"
|
||||||
jwt "ferry/pkg/jwtauth"
|
jwt "ferry/pkg/jwtauth"
|
||||||
"ferry/router/dashboard"
|
|
||||||
"ferry/router/process"
|
"ferry/router/process"
|
||||||
systemRouter "ferry/router/system"
|
systemRouter "ferry/router/system"
|
||||||
|
|
||||||
@ -54,6 +54,9 @@ func sysNoCheckRoleRouter(r *gin.RouterGroup) {
|
|||||||
v1.GET("/monitor/server", monitor.ServerInfo)
|
v1.GET("/monitor/server", monitor.ServerInfo)
|
||||||
v1.GET("/getCaptcha", system.GenerateCaptchaHandler)
|
v1.GET("/getCaptcha", system.GenerateCaptchaHandler)
|
||||||
v1.GET("/menuTreeselect", system.GetMenuTreeelect)
|
v1.GET("/menuTreeselect", system.GetMenuTreeelect)
|
||||||
|
|
||||||
|
// 首页数据
|
||||||
|
v1.GET("/dashboard", dashboard.InitData)
|
||||||
}
|
}
|
||||||
|
|
||||||
func sysCheckRoleRouterInit(r *gin.RouterGroup, authMiddleware *jwtauth.GinJWTMiddleware) {
|
func sysCheckRoleRouterInit(r *gin.RouterGroup, authMiddleware *jwtauth.GinJWTMiddleware) {
|
||||||
@ -64,7 +67,7 @@ func sysCheckRoleRouterInit(r *gin.RouterGroup, authMiddleware *jwtauth.GinJWTMi
|
|||||||
v1 := r.Group("/api/v1")
|
v1 := r.Group("/api/v1")
|
||||||
|
|
||||||
// 首页
|
// 首页
|
||||||
dashboard.RegisterDashboardRouter(v1, authMiddleware)
|
//dashboard.RegisterDashboardRouter(v1, authMiddleware)
|
||||||
|
|
||||||
// 系统管理
|
// 系统管理
|
||||||
systemRouter.RegisterPageRouter(v1, authMiddleware)
|
systemRouter.RegisterPageRouter(v1, authMiddleware)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user