This commit is contained in:
ryan
2026-06-18 16:08:48 +08:00
parent 3366edb3a1
commit 772962c2e9
156 changed files with 23460 additions and 183 deletions
@@ -0,0 +1,27 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
package dashboard
import (
"github.com/Rain-kl/Wavelet/internal/apps/openflare/compat"
"github.com/gin-gonic/gin"
)
// RegisterRoutes mounts legacy OpenFlare dashboard routes.
func RegisterRoutes(apiGroup *gin.RouterGroup) {
dashboardRoute := apiGroup.Group("/dashboard")
dashboardRoute.Use(compat.AdminAuth())
{
dashboardRoute.GET("/overview", getOverviewHandler)
}
}
func getOverviewHandler(c *gin.Context) {
overview, err := GetOverview(c.Request.Context())
if err != nil {
compat.Fail(c, err.Error())
return
}
compat.OK(c, overview)
}