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:
+1
-5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user