From ba31c223ce098b0e802189d6cd34af54c1048e2c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sat, 21 Mar 2026 21:54:11 -0400 Subject: [PATCH] feat: initialize FiltersHandler in main server configuration Add FiltersHandler to server initialization to enable saved filters API endpoints. Changes to cmd/server/main.go: - Initialize filtersHandler using handlers.NewFiltersHandler(queries) - Add FiltersHandler to Config struct for route registration This enables the following API endpoints: - GET /api/saved-filters?resource_type=X - List filters - POST /api/saved-filters - Create filter - PUT /api/saved-filters/:id - Update filter - DELETE /api/saved-filters/:id - Delete filter Part of saved filters feature implementation. --- cmd/server/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 2382919..cadc7b5 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -122,6 +122,7 @@ func main() { collectionHandler := handlers.NewCollectionHandler(queries, libraryService, connManager) dashboardService := services.NewDashboardService(queries) dashboardHandler := handlers.NewDashboardHandler(queries) + filtersHandler := handlers.NewFiltersHandler(queries) mediaHandler := handlers.NewMediaHandler(queries, libraryService, worker) matchingHandler := handlers.NewMatchingHandler(queries, connManager) jobsHandler := handlers.NewJobsHandler(queries, worker) @@ -178,6 +179,7 @@ func main() { AnalyticsHandler: analyticsHandler, QueueHandler: queueHandler, CollectionHandler: collectionHandler, + FiltersHandler: filtersHandler, DashboardHandler: dashboardHandler, DashboardService: dashboardService, OPDSHandler: opdsHandler,