modified: internal/routes/routes.go
add to v1/check the check function
This commit is contained in:
@@ -30,15 +30,15 @@ func SetupRouter(db *gorm.DB) http.Handler {
|
||||
healthHandler := handlers.NewHealthHandler()
|
||||
authHandler := handlers.NewAuthHandler(authService)
|
||||
|
||||
h := handlers.NewHealthHandler()
|
||||
|
||||
// Health routes
|
||||
r.Mount("/", healthHandler.Routes())
|
||||
|
||||
// API v1 routes
|
||||
r.Route("/v1", func(r chi.Router) {
|
||||
// Add the new /check route
|
||||
r.Get("/check", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
r.Get("/check", h.Check)
|
||||
r.Mount("/auth", authHandler.Routes())
|
||||
|
||||
// Здесь будут добавлены другие маршруты:
|
||||
|
||||
Reference in New Issue
Block a user