Files
bookhoard/internal/router/progress.go
T
john-okeefe a635c6d46e refactor(router): remove duplicate progress routes, add ProgressService to config
- Remove GET /progress/:id and POST /progress/:id from progress routes.
  These were superseded by the media-item progress routes. Only
  GET /progress/:id/history remains.

- Add ProgressService to router.Config so sync.go can inject it into
  KoboHandler via SetProgressService().

- Inject ProgressService into KoboHandler at route registration time
  rather than requiring a separate setup step.

- Update comment from 'Legacy progress routes' to 'Progress routes'.
2026-04-25 21:16:39 -04:00

15 lines
318 B
Go

package router
import (
"bookhoard/internal/handlers"
)
func registerProgressRoutes(cfg *Config, scannerHandler *handlers.Handler) {
e := cfg.Echo
jwtMiddleware := createJWTMiddleware(cfg)
protected := e.Group("/api", jwtMiddleware)
protected.GET("/progress/:id/history", scannerHandler.GetProgressHistory)
}