feat: add cache invalidation for series after updating or deleting read progress, and enhance BookGrid and BookList components with refresh functionality

This commit is contained in:
Julien Froidefond
2025-12-07 18:49:16 +01:00
parent 6b6fed34fb
commit 181240cd5f
6 changed files with 62 additions and 8 deletions

View File

@@ -61,6 +61,16 @@ export class BookService extends BaseApiService {
}
}
static async getBookSeriesId(bookId: string): Promise<string> {
try {
// Récupérer le livre sans cache pour éviter les données obsolètes
const book = await this.fetchFromApi<KomgaBook>({ path: `books/${bookId}` });
return book.seriesId;
} catch (error) {
throw new AppError(ERROR_CODES.BOOK.NOT_FOUND, {}, error);
}
}
static async updateReadProgress(
bookId: string,
page: number,