diff --git a/backend/main.go b/backend/main.go index 166d855..db75778 100644 --- a/backend/main.go +++ b/backend/main.go @@ -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) {