fix coverURL usage in the frontend

This commit is contained in:
David 2022-01-15 15:46:59 -05:00
parent 3e1b06e95a
commit 7ee118c1cd

View File

@ -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 ? `<img src="${coverurl}"/>` : ""}
return `${coverURL ? `<img src="${coverURL}"/>` : ""}
<h1 ${onLoan ? "class='onLoan' " : ""}>${title}</h1>
<h2>${authors}</h2>
<span>${isbn13}</span><br/>