Get description as well

This commit is contained in:
aditya.chandel
2025-01-01 15:47:13 -07:00
parent df001a0020
commit 0e6ef1da5e
2 changed files with 6 additions and 2 deletions
@@ -29,7 +29,7 @@
<p><strong>Publisher:</strong> {{ metadata.publisher }}</p>
<p><strong>Published Date:</strong> {{ metadata.publishedDate }}</p>
<p><strong>ISBN:</strong> {{ metadata.isbn10 }}</p>
<p><strong>Description:</strong> {{ truncateDescription(metadata.description) }}</p>
<p><strong>Description:</strong> {{ truncateDescription(metadata.description!) }}</p>
<p><strong>Page Count:</strong> {{ metadata.pageCount }}</p>
<p *ngIf="metadata.googleBookId">
<strong>Google Book Id: </strong>
@@ -188,7 +188,11 @@ export class BookService {
}
getBookByIdFromAPI(bookId: number, withDescription: boolean) {
return this.http.get<Book>(`${this.url}/${bookId}`);
return this.http.get<Book>(`${this.url}/${bookId}`, {
params: {
withDescription: withDescription.toString()
}
});
}
fetchMetadataFromSource(bookId: number): Observable<FetchedMetadata> {