diff --git a/lib/cover.go b/lib/cover.go index 0ecc8bf..59c0633 100644 --- a/lib/cover.go +++ b/lib/cover.go @@ -32,17 +32,12 @@ const ( func coverHandler(h handler) { vars := mux.Vars(h.r) - book, err := h.db.GetBookID(vars["id"]) - if err != nil { - notFound(h) - return - } file := coverFile if vars["size"] == "small" { file = coverSmallFile } - f, err := h.store.Get(book.ID, file) + f, err := h.store.Get(vars["id"], file) if err != nil { log.Error("Error while opening image: ", err) notFound(h)