fix(calendar): use r.Route subrouter to avoid chi path ambiguity with /channels/events/{eventID}

This commit is contained in:
2026-07-09 14:43:34 -04:00
parent 9a6f15662b
commit af913b9923
4 changed files with 14 additions and 3 deletions
+7
View File
@@ -243,6 +243,13 @@ func main() {
notification.NewHandler(database.DB, logger).RegisterRoutes(r)
})
// Calendar events
calHandler := channel.NewHandler(database.DB, permissionsChecker)
r.Route("/channels/{channelID}/events", func(r chi.Router) {
r.Get("/", calHandler.ListEvents)
r.Post("/", calHandler.CreateEvent)
})
// Push notifications
pushHandler.RegisterRoutes(r)