From 0c0ba185dcf2868f4956615c85e4f7629dd07e07 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 27 Feb 2026 21:50:11 -0500 Subject: [PATCH] refactor(handlers): remove FilePath from API responses Remove the FilePath field from book metadata responses in the GetShelf endpoint. This change improves security by not exposing internal file paths to API clients, as the application now uses relative path storage with URL resolution via the library service. Changes: - Remove FilePath field from BookPreview struct in GetShelf response - Remove FilePath field from shelf items response Related to previous commit implementing relative path storage. --- internal/handlers/media.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/handlers/media.go b/internal/handlers/media.go index 9986ef4..7c71428 100644 --- a/internal/handlers/media.go +++ b/internal/handlers/media.go @@ -233,7 +233,6 @@ func (h *MediaHandler) GetShelf(c echo.Context) error { LastSyncedAt: b.LastSyncedAt, Title: b.Title, Author: b.Author, - FilePath: b.FilePath, MimeType: b.MimeType, EntitlementID: b.EntitlementID, KoboContentID: b.KoboContentID, @@ -268,7 +267,6 @@ func (h *MediaHandler) GetShelf(c echo.Context) error { MediaItemID: uuid.UUID(book.MediaItemID.Bytes).String(), Title: book.Title, Author: book.Author.String, - FilePath: book.FilePath, MimeType: book.MimeType.String, ShelfName: book.ShelfName.String, ShelfPosition: int(book.ShelfPosition.Int32),