add legacy route and new
This commit is contained in:
@@ -74,7 +74,9 @@ func (r *Router) MustRoute() chi.Router {
|
|||||||
|
|
||||||
r.r.Route("/api", func(api chi.Router) {
|
r.r.Route("/api", func(api chi.Router) {
|
||||||
api.Route("/block", api_block.MustRoute(r.cfg))
|
api.Route("/block", api_block.MustRoute(r.cfg))
|
||||||
api.Route("/users", api_auth.MustRoute(r.cfg, r.authService))
|
authRoute := api_auth.MustRoute(r.cfg, r.authService)
|
||||||
|
api.Route("/auth", authRoute)
|
||||||
|
api.Route("/users", authRoute) // legacy support
|
||||||
})
|
})
|
||||||
|
|
||||||
r.r.Get("/health", func(w http.ResponseWriter, r *http.Request) {
|
r.r.Get("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user