From 7ee118c1cdaa900287dad4fe62bf7f5aa2a7feaa Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sat, 15 Jan 2022 15:46:59 -0500 Subject: [PATCH] fix coverURL usage in the frontend --- frontend/files/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/files/app.js b/frontend/files/app.js index 87d0b4e..c43f19a 100644 --- a/frontend/files/app.js +++ b/frontend/files/app.js @@ -69,8 +69,8 @@ function apiResponseParsing(book) { if (!book["isbn-10"] && book["isbn-13"]) { book["isbn-10"] = ISBNfromEAN(book["isbn-13"]); } - if (!book.coverurl && book["isbn-10"]) { - book.coverurl = + if (!book.coverURL && book["isbn-10"]) { + book.coverURL = `https://images-na.ssl-images-amazon.com/images/P/` + book["isbn-10"] + `.01.LZZ.jpg`; @@ -123,7 +123,7 @@ function ISBNfromEAN(EAN) { function BookTemplate({ "isbn-13": isbn13, authors, - coverurl, + coverURL, description, format, notes, @@ -135,7 +135,7 @@ function BookTemplate({ volume, year, }) { - return `${coverurl ? `` : ""} + return `${coverURL ? `` : ""}

${title}

${authors}

${isbn13}