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.
This commit is contained in:
2026-02-27 21:50:11 -05:00
parent 6dd8e441d1
commit 0c0ba185dc
-2
View File
@@ -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),