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'.
This commit is contained in:
@@ -7,12 +7,8 @@ import (
|
||||
func registerProgressRoutes(cfg *Config, scannerHandler *handlers.Handler) {
|
||||
e := cfg.Echo
|
||||
|
||||
// JWT middleware for protected routes
|
||||
jwtMiddleware := createJWTMiddleware(cfg)
|
||||
protected := e.Group("/api", jwtMiddleware)
|
||||
|
||||
// Universal Progress routes
|
||||
protected.GET("/progress/:id", scannerHandler.GetUniversalProgress)
|
||||
protected.POST("/progress/:id", scannerHandler.UpdateUniversalProgress)
|
||||
protected.GET("/progress/:id/history", scannerHandler.GetProgressHistory)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user