fix: resolve chi route collision on /bookings path

Use direct Post with inline middleware instead of Route group to avoid
duplicate mount path panic with the existing authenticated /bookings Route.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-29 23:12:54 +01:00
co-authored by Sisyphus
parent 6766c6128c
commit b1bc46290f
+1 -5
View File
@@ -138,11 +138,7 @@ func main() {
})
// Public booking endpoints (optional auth for slot reservation)
r.Route("/bookings", func(r chi.Router) {
r.Use(mw.RateLimit(30, time.Minute))
r.Use(mw.OptionalAuth)
r.Post("/reserve", bookings.ReserveSlotHandler)
})
r.With(mw.RateLimit(30, time.Minute), mw.OptionalAuth).Post("/bookings/reserve", bookings.ReserveSlotHandler)
// Authenticated users
r.Group(func(r chi.Router) {