feat(router): 参数化 callback URL
This commit is contained in:
@ -2,11 +2,13 @@ package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"onvif-agent/router/handler"
|
||||
"onvif-agent/router/handler/onvif"
|
||||
)
|
||||
|
||||
func SetupRoutes(r *gin.Engine) {
|
||||
// ONVIF 相关路由
|
||||
r.GET("/ping", handler.Ping)
|
||||
|
||||
userGroup := r.Group("/onvif")
|
||||
{
|
||||
connectionGroup := userGroup.Group("/connections")
|
||||
@ -20,7 +22,7 @@ func SetupRoutes(r *gin.Engine) {
|
||||
subscriptionGroup := userGroup.Group("/subscriptions")
|
||||
{
|
||||
subscriptionGroup.POST("/:xaddr", onvif.CreateEventSubscription)
|
||||
subscriptionGroup.POST("/callback", onvif.EventNotifyCallback)
|
||||
subscriptionGroup.POST("/:xaddr/callback", onvif.EventNotifyCallback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user