feat: add server sync to Kobo endpoint and media routes

This commit is contained in:
2026-01-31 00:29:39 -05:00
parent fef41dc168
commit 42c3168fcf
2 changed files with 140 additions and 0 deletions
+9
View File
@@ -199,6 +199,15 @@ func main() {
koboSync.POST("/bookmark", deviceAuthMiddleware.Authenticate(koboHandler.Bookmark))
koboSync.POST("/v1/analytics/gettests", deviceAuthMiddleware.Authenticate(koboHandler.AnalyticsGettests))
koboSync.GET("/v1/initialization", deviceAuthMiddleware.Authenticate(koboHandler.Initialization))
koboSync.POST("/sync-from-server", deviceAuthMiddleware.Authenticate(koboHandler.SyncFromServer))
// Media item routes (download and shelf management)
mediaHandler := handlers.NewMediaHandler(queries)
e.GET("/api/books/:uuid/download", mediaHandler.DownloadBook)
protected.POST("/devices/:id/shelves", mediaHandler.AddToShelf)
protected.GET("/devices/:id/shelves", mediaHandler.GetShelf)
protected.DELETE("/devices/:id/shelves", mediaHandler.RemoveFromShelf)
protected.DELETE("/devices/:id/shelves/clear", mediaHandler.ClearShelf)
// Device management routes (protected - require user auth)
devices := protected.Group("/devices")