package router

func registerFiltersRoutes(cfg *Config) {
	e := cfg.Echo

	// JWT middleware for protected routes
	jwtMiddleware := createJWTMiddleware(cfg)
	protected := e.Group("/api", jwtMiddleware)

	// Saved filters routes
	filters := protected.Group("/saved-filters")
	filters.GET("", cfg.FiltersHandler.GetSavedFilters)
	filters.GET("/:id", cfg.FiltersHandler.GetSavedFilterByID)
	filters.POST("", cfg.FiltersHandler.CreateSavedFilter)
	filters.PUT("/:id", cfg.FiltersHandler.UpdateSavedFilter)
	filters.DELETE("/:id", cfg.FiltersHandler.DeleteSavedFilter)
}
