refactor: simplify router configuration and handler setup
- Move JWT middleware creation to shared function - Simplify library route registration - Add bulk-add-books endpoint to collections - Clean up duplicate handler setup code - Improve route organization and maintainability
This commit is contained in:
@@ -12,8 +12,8 @@ func registerSyncRoutes(cfg *Config) {
|
||||
|
||||
protected := e.Group("/api", jwtMiddleware)
|
||||
|
||||
// Setup ebook handler routes first
|
||||
h := handlers.SetupRoutes(protected, cfg.Queries, cfg.ConnManager)
|
||||
// Create handler for sync-specific routes
|
||||
h := handlers.NewHandler(cfg.Queries, cfg.ConnManager)
|
||||
|
||||
// Book matching and unlinked book resolution routes
|
||||
sync := protected.Group("/sync")
|
||||
|
||||
Reference in New Issue
Block a user