Fix shelf

This commit is contained in:
aditya.chandel
2025-01-16 00:18:20 -07:00
parent 532246b18b
commit 50dd24e9f2
5 changed files with 5 additions and 9 deletions
@@ -122,7 +122,6 @@ export class BookService {
const url = `/pdf-viewer/book/${book.id}`;
window.open(url, '_blank');
this.updateLastReadTime(book.id).subscribe({
next: () => console.log('Last read time updated successfully'),
error: err => console.error('Failed to update last read time', err),
});
} else if (book.bookType === "EPUB") {
@@ -151,7 +150,6 @@ export class BookService {
}
getBookData(bookId: number): Observable<Blob> {
console.log('Fetching book data...');
return this.http.get<Blob>(`${this.url}/${bookId}/data`, {responseType: 'blob' as 'json'});
}
@@ -22,6 +22,10 @@ export class ShelfService {
private http = inject(HttpClient);
private bookService = inject(BookService);
constructor() {
this.loadShelves();
}
private loadShelves(): void {
this.http.get<Shelf[]>(this.url).pipe(
catchError(error => {