Open fourcels opened 1 year ago
I'm sorry it took me so long to check this PR, not sure if I follow the idea. Could you explain what is the goal of the change?
// Endpoints with admin access.
r.Route("/admin", func(r chi.Router) {
r.Group(func(r chi.Router) {
r.Wrap(adminAuth, adminSecuritySchema) // Add both middlewares to routing group to enforce and document security.
r.Method(http.MethodPut, "/hello/{name}", nethttp.NewHandler(u))
})
})
to
r.Route("/admin", func(r *chirouter.Wrapper) {
r.Group(func(r *chirouter.Wrapper) {
r.Wrap(adminAuth, adminSecuritySchema) // Add both middlewares to routing group to enforce and document security.
r.Put("/hello/{name}", u)
})
})
Router
and Group Router
use same router style