This commit is contained in:
2025-12-18 19:56:56 +02:00
parent ae1e5600ae
commit e9b7f8ca17

View File

@@ -22,11 +22,11 @@ type Router struct {
cfg *config.Config
authService *auth.AuthService
authService *auth.Service
}
type RouterDependencies struct {
AuthService *auth.AuthService
AuthService *auth.Service
Configuration *config.Config
}
@@ -74,7 +74,7 @@ func (r *Router) MustRoute() chi.Router {
r.r.Route("/api", func(api chi.Router) {
api.Route("/block", api_block.MustRoute(r.cfg))
api.Route("/auth", api_auth.MustRoute(r.cfg))
api.Route("/users", api_auth.MustRoute(r.cfg, r.authService))
})
r.r.Get("/health", func(w http.ResponseWriter, r *http.Request) {