refactor: remove unused middleware imports from router
Clean up internal/router/router.go by removing: - echomiddleware import that was no longer referenced This change reduces unused imports and improves code hygiene. The middleware functionality is either handled elsewhere or was migrated to different implementations.
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
echojwt "github.com/labstack/echo-jwt/v5"
|
||||
"github.com/labstack/echo/v5"
|
||||
echomiddleware "github.com/labstack/echo/v5/middleware"
|
||||
)
|
||||
|
||||
// CustomValidator wraps the go-playground validator
|
||||
@@ -183,12 +182,6 @@ func RegisterRoutes(cfg *Config) *handlers.Handler {
|
||||
}
|
||||
e.Validator = &CustomValidator{validator: v}
|
||||
|
||||
// Global middleware
|
||||
e.Use(echomiddleware.RequestLogger())
|
||||
e.Use(echomiddleware.Recover())
|
||||
e.Use(echomiddleware.CORS())
|
||||
e.Use(ratelimit.RequestTracingMiddleware(cfg.Cfg))
|
||||
|
||||
// Rate limiter
|
||||
rateLimiterConfig := ratelimit.RateLimiterConfig{
|
||||
Enabled: cfg.Cfg.RateLimitEnabled,
|
||||
|
||||
Reference in New Issue
Block a user