first version
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user