🎨客户端列表新增客户端数据流量情况

This commit is contained in:
coward
2024-07-10 10:51:20 +08:00
parent 697341f823
commit 4b864f76bb
5 changed files with 73 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ package router
import (
"github.com/gin-gonic/gin"
"wireguard-ui/config"
)
type Option func(engine *gin.RouterGroup)
@@ -19,6 +20,10 @@ func InitRouter() *gin.Engine {
// 将请求打印至控制台
r.Use(gin.Logger())
if config.Config.File.Type == "local" {
r.Static("/assets", config.Config.File.Path)
}
for _, opt := range options {
opt(r.Group("api"))
}