add line webhook router
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package routes
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
import (
|
||||
"git.trj.tw/golang/mtgbot/modules/context"
|
||||
"git.trj.tw/golang/mtgbot/router/line"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var r *gin.Engine
|
||||
|
||||
@@ -16,4 +20,8 @@ func SetRoutes(r *gin.Engine) {
|
||||
r.GET("/", func(c *gin.Context) {
|
||||
c.String(200, "Hello")
|
||||
})
|
||||
|
||||
r.POST("/line", context.PatchCtx(line.GetRawBody), context.PatchCtx(line.VerifyLine), context.PatchCtx(line.LineWebhook))
|
||||
r.POST("/line/", context.PatchCtx(line.GetRawBody), context.PatchCtx(line.VerifyLine), context.PatchCtx(line.LineWebhook))
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user