feat: Clearing cache automatically after quitting e read session
This commit is contained in:
@@ -21,6 +21,7 @@ export function ClientBookReader({ book, pages }: ClientBookReaderProps) {
|
||||
|
||||
const handleCloseReader = () => {
|
||||
setIsReading(false);
|
||||
//Fetch une nouvelle route pour rafraichir les différents caches
|
||||
router.back();
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ export function ClientBookWrapper({ book, pages }: ClientBookWrapperProps) {
|
||||
const router = useRouter();
|
||||
|
||||
const handleCloseReader = () => {
|
||||
fetch(`/api/komga/cache/clear/${book.libraryId}/${book.seriesId}`, {
|
||||
method: "POST",
|
||||
});
|
||||
router.back();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user