refactor: use ScannerHandler directly for library convenience routes
Previously, library routes used a generic NewHandler for convenience routes. Now uses cfg.ScannerHandler directly for consistency with other scanner endpoints and to ensure proper handler-specific middleware is applied.
This commit is contained in:
@@ -16,7 +16,7 @@ func registerLibraryRoutes(cfg *Config) {
|
|||||||
protected := e.Group("/api", jwtMiddleware)
|
protected := e.Group("/api", jwtMiddleware)
|
||||||
|
|
||||||
// Create handler for library-specific convenience routes
|
// Create handler for library-specific convenience routes
|
||||||
h := handlers.NewHandler(cfg.Queries, cfg.ConnManager, cfg.QueueProcessor)
|
h := cfg.ScannerHandler
|
||||||
|
|
||||||
// Public library types endpoint
|
// Public library types endpoint
|
||||||
e.GET("/api/libraries/types", cfg.LibraryHandler.GetLibraryTypes)
|
e.GET("/api/libraries/types", cfg.LibraryHandler.GetLibraryTypes)
|
||||||
|
|||||||
Reference in New Issue
Block a user