first version

This commit is contained in:
Jay
2019-05-03 17:17:44 +08:00
parent 8a536a37d0
commit ce2eb1257f
12 changed files with 636 additions and 6 deletions
+7
View File
@@ -3,6 +3,8 @@ package routes
import (
"net/http"
"git.trj.tw/golang/go-ddns-svc/module/context"
"git.trj.tw/golang/go-ddns-svc/route/api"
"github.com/gin-gonic/gin"
)
@@ -21,4 +23,9 @@ func SetRoutes() {
e.GET("/", func(c *gin.Context) {
c.String(http.StatusOK, "OK")
})
apiGroup := e.Group("/api", context.PatchCtx(api.VerifyPrivate))
{
apiGroup.POST("/ddns", context.PatchCtx(api.UpdateDDNS))
}
}