wireguard-dashboard/route/server.go

17 lines
674 B
Go
Raw Normal View History

2024-03-07 17:07:41 +08:00
package route
import (
"github.com/gin-gonic/gin"
"wireguard-dashboard/http/api"
"wireguard-dashboard/middleware"
)
2024-03-13 17:05:02 +08:00
func ServerApi(r *gin.RouterGroup) {
2024-06-06 17:02:45 +08:00
apiGroup := r.Group("server", middleware.Authorization(), middleware.SystemLogRequest())
2024-03-07 17:07:41 +08:00
{
2024-06-06 17:02:45 +08:00
apiGroup.GET("", api.Server().GetServer) // 获取服务端信息
apiGroup.POST("", middleware.Permission(), middleware.Permission(), api.Server().SaveServer) // 新增/更新服务端信息
apiGroup.POST("control-server", middleware.Permission(), middleware.Permission(), api.Server().ControlServer) // 服务端操作控制
2024-03-07 17:07:41 +08:00
}
}