fix: resolve duplicate path prefix issues for message and webhook routes
This commit is contained in:
+4
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user