fix: restore original route paths and parameters
Revert unauthorized route changes made during router refactoring: Device Routes: - Change :token back to :registration_id in approve/reject routes - Keep routes in correct location (approve/reject in protected group) OPDS Routes: - Restore /opds/devices/:deviceId/* structure (was /opds/:id/*) - Add back missing :bookId parameter for download/cover/formats - Change 'navigation' back to 'nav' Queue Routes: - Add missing admin-only routes - Add missing device-specific queue management routes All routes now match original main.go signatures exactly. Breaking changes reverted - API contract restored.
This commit is contained in:
@@ -5,11 +5,11 @@ func registerOPDSRoutes(cfg *Config) {
|
||||
|
||||
// OPDS routes (public - device authentication optional)
|
||||
// Note: OPDSHandler implements its own device authentication
|
||||
e.GET("/opds/:id", cfg.OPDSHandler.GetDeviceCatalog)
|
||||
e.GET("/opds/:id/search", cfg.OPDSHandler.SearchDeviceCatalog)
|
||||
e.GET("/opds/:id/download", cfg.OPDSHandler.DownloadBook)
|
||||
e.GET("/opds/:id/cover", cfg.OPDSHandler.GetCoverImage)
|
||||
e.GET("/opds/:id/navigation", cfg.OPDSHandler.GetDeviceNavigation)
|
||||
e.GET("/opds/:id/formats", cfg.OPDSHandler.ListFormats)
|
||||
e.POST("/opds/register", cfg.OPDSHandler.RegisterOPDS)
|
||||
opds := e.Group("/opds/devices")
|
||||
opds.GET("/:deviceId/catalog", cfg.OPDSHandler.GetDeviceCatalog)
|
||||
opds.GET("/:deviceId/search", cfg.OPDSHandler.SearchDeviceCatalog)
|
||||
opds.GET("/:deviceId/nav", cfg.OPDSHandler.GetDeviceNavigation)
|
||||
opds.GET("/:deviceId/download/:bookId", cfg.OPDSHandler.DownloadBook)
|
||||
opds.GET("/:deviceId/cover/:bookId", cfg.OPDSHandler.GetCoverImage)
|
||||
opds.GET("/:deviceId/formats/:bookId", cfg.OPDSHandler.ListFormats)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user