19 lines
554 B
Go
19 lines
554 B
Go
package admin
|
|
|
|
import (
|
|
"dd_fiber_api/internal/admin/statistics"
|
|
admin_auth_middleware "dd_fiber_api/internal/admin_auth/middleware"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
// SetupStatisticsRoutes 设置统计路由
|
|
func SetupStatisticsRoutes(router fiber.Router, statisticsHandler *statistics.Handler) {
|
|
if statisticsHandler == nil {
|
|
return
|
|
}
|
|
|
|
stats := router.Group("/statistics")
|
|
stats.Get("/dashboard", admin_auth_middleware.PermissionMiddleware("statistics:dashboard:read"), statisticsHandler.GetStatistics).Name("获取仪表盘统计数据")
|
|
}
|