wireguard-dashboard/route/setting.go

19 lines
459 B
Go
Raw Normal View History

2024-03-14 15:23:16 +08:00
package route
import (
"github.com/gin-gonic/gin"
"wireguard-dashboard/http/api"
"wireguard-dashboard/middleware"
)
// SettingApi
// @description: 设置相关API
// @param r
func SettingApi(r *gin.RouterGroup) {
apiGroup := r.Group("setting", middleware.Authorization())
{
apiGroup.GET("server", api.Setting().GetGlobalSetting) // 获取全局服务端配置
apiGroup.GET("public-ip", api.Setting().GetPublicNetworkIP) // 获取公网IP
}
}