fix: resolve duplicate path prefix issues for message and webhook routes

This commit is contained in:
root
2026-06-29 17:48:28 +00:00
parent de465c6527
commit bb67a7652e
3 changed files with 8 additions and 7 deletions
+4 -2
View File
@@ -205,10 +205,12 @@ func main() {
bot.NewCommandHandler(database.DB).RegisterCommandRoutes(r)
})
// Webhooks (protected: create/delete)
// Webhooks (protected: create/list/delete)
webhookHandler := webhook.NewHandler(database.DB, hub)
r.Route("/channels/{channelID}/webhooks", func(r chi.Router) {
webhook.NewHandler(database.DB, hub).RegisterRoutes(r)
webhookHandler.RegisterRoutes(r)
})
r.Delete("/webhooks/{webhookID}", webhookHandler.Delete)
// Invites (rate limited to prevent brute-force join)
r.Route("/invites", func(r chi.Router) {