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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user