작업중 커밋

This commit is contained in:
Kyeongdae Moon 2022-02-19 17:51:41 +09:00 committed by ned3y2k
parent 4be3a65691
commit 6e87a96d34
10 changed files with 383 additions and 18 deletions

View file

@ -3,12 +3,11 @@ package main
import (
"flag"
"fmt"
"github.com/labstack/echo/v4"
"net/http"
"time"
rice "github.com/GeertJohan/go.rice"
"github.com/labstack/echo/v4"
"github.com/ngoduykhanh/wireguard-ui/emailer"
"github.com/ngoduykhanh/wireguard-ui/handler"
"github.com/ngoduykhanh/wireguard-ui/router"
@ -147,6 +146,8 @@ func main() {
app.GET("/api/machine-ips", handler.MachineIPAddresses(), handler.ValidSession)
app.GET("/api/suggest-client-ips", handler.SuggestIPAllocation(db), handler.ValidSession)
app.GET("/api/apply-wg-config", handler.ApplyServerConfig(db, tmplBox), handler.ValidSession)
app.GET("/wake_on_lan_hosts", handler.GetWakeOnLanHosts(db), handler.ValidSession)
app.POST("/wake_on_lan_host", handler.SaveWakeOnLanHost(db), handler.ValidSession)
// servers other static files
app.GET("/static/*", echo.WrapHandler(http.StripPrefix("/static/", assetHandler)))