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:
@@ -22,7 +22,7 @@ func registerMediaRoutes(cfg *Config) {
|
||||
protected.PUT("/media-items/:id/rating", cfg.MediaHandler.UpdateMediaRating)
|
||||
protected.DELETE("/media-items/:id/rating", cfg.MediaHandler.DeleteMediaRating)
|
||||
|
||||
// Legacy progress routes (all authenticated users)
|
||||
// Progress routes (all authenticated users)
|
||||
protected.GET("/media-items/:id/progress", cfg.MediaHandler.GetMediaReadingProgress)
|
||||
protected.PUT("/media-items/:id/progress", cfg.MediaHandler.UpdateMediaReadingProgress)
|
||||
protected.DELETE("/media-items/:id/progress", cfg.MediaHandler.DeleteMediaReadingProgress)
|
||||
|
||||
Reference in New Issue
Block a user