diff --git a/api/src/BookRepository/OpenLibraryBookRepository.php b/api/src/BookRepository/OpenLibraryBookRepository.php index a2ced9c3..29d279e8 100644 --- a/api/src/BookRepository/OpenLibraryBookRepository.php +++ b/api/src/BookRepository/OpenLibraryBookRepository.php @@ -36,7 +36,8 @@ public function find(string $url): ?Book $book->author = null; if (isset($data['authors'][0]['key'])) { - $author = $this->openLibraryClient->request('GET', $data['authors'][0]['key'] . '.json', $options); + $authorResponse = $this->openLibraryClient->request('GET', $data['authors'][0]['key'] . '.json', $options); + $author = $this->decoder->decode($authorResponse->getContent(), 'json'); if (isset($author['name'])) { $book->author = $author['name']; }