feat(audiobooks): mount ABS bookmark routes at /abs/api and /api

Registers POST/PATCH/DELETE /me/item/{itemId}/bookmark inside the
existing bearerAuth group so real ABS clients hitting either prefix
resolve to the same handlers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
RXWatcher
2026-05-26 14:09:36 +02:00
co-authored by Claude Opus 4.7
parent 2736688538
commit a0dcc860b4
+4
View File
@@ -313,6 +313,10 @@ func (h *Handler) mountRoutes(r chi.Router) {
r.Patch(prefix+"/session/{sid}", h.handleSessionSync)
// POST /session/{sid}/close — finalise the play session
r.Post(prefix+"/session/{sid}/close", h.handleSessionClose)
// Bookmarks — POST/PATCH both upsert; DELETE is idempotent.
r.Post(prefix+"/me/item/{itemId}/bookmark", h.handleUpsertBookmark("bookmark_created"))
r.Patch(prefix+"/me/item/{itemId}/bookmark", h.handleUpsertBookmark("bookmark_updated"))
r.Delete(prefix+"/me/item/{itemId}/bookmark/{time}", h.handleDeleteBookmark)
}
})