diff --git a/internal/handlers/ebook.go b/internal/handlers/ebook.go index 757e008..1d165b7 100644 --- a/internal/handlers/ebook.go +++ b/internal/handlers/ebook.go @@ -795,7 +795,7 @@ func (h *Handler) CreateMediaItem(c echo.Context) error { LibraryID: pgtype.UUID{Bytes: req.LibraryID, Valid: true}, Title: req.Title, Author: pgtype.Text{String: req.Author, Valid: req.Author != ""}, - Isbn: req.ISBN, + Isbn: pgtype.Text{String: req.ISBN, Valid: req.ISBN != ""}, Description: pgtype.Text{String: req.Description, Valid: req.Description != ""}, FilePath: req.FilePath, FileSize: pgtype.Int8{Int64: req.FileSize, Valid: req.FileSize > 0}, @@ -866,7 +866,7 @@ func (h *Handler) UpdateMediaItem(c echo.Context) error { ID: pgtype.UUID{Bytes: mediaUUID, Valid: true}, Title: req.Title, Author: pgtype.Text{String: req.Author, Valid: req.Author != ""}, - Isbn: req.ISBN, + Isbn: pgtype.Text{String: req.ISBN, Valid: req.ISBN != ""}, Description: pgtype.Text{String: req.Description, Valid: req.Description != ""}, CoverImagePath: pgtype.Text{String: req.CoverImagePath, Valid: req.CoverImagePath != ""}, Series: pgtype.Text{String: req.Series, Valid: req.Series != ""},