feat(webhook): align chatwoot ingress routes
This commit is contained in:
@@ -13,6 +13,11 @@ import (
|
||||
// Reference: P2E §4 — webhook authentication per channel type
|
||||
func WebhookAuth(registry *auth.WebhookTokenRegistry) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
if registry == nil {
|
||||
response.AbortWithStatusError(c, http.StatusUnauthorized, response.ErrUnauthorized, "Webhook registry not configured")
|
||||
return
|
||||
}
|
||||
|
||||
channelType := c.Param("channel_type")
|
||||
identifier := c.Param("identifier")
|
||||
|
||||
@@ -23,4 +28,4 @@ func WebhookAuth(registry *auth.WebhookTokenRegistry) gin.HandlerFunc {
|
||||
}
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user