diff options
| author | Fuwn <[email protected]> | 2024-01-04 00:44:20 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-04 00:44:20 -0800 |
| commit | efd5c08fe774efcaf12432423423690d3ca09016 (patch) | |
| tree | 4a85d9fc218af8d366d88ec4ad85e8f4940167a5 /src/lib/List/Manga/MangaListTemplate.svelte | |
| parent | refactor(wrapped): move panels to components (diff) | |
| download | due.moe-efd5c08fe774efcaf12432423423690d3ca09016.tar.xz due.moe-efd5c08fe774efcaf12432423423690d3ca09016.zip | |
refactor(manga): use built-in increment
Diffstat (limited to 'src/lib/List/Manga/MangaListTemplate.svelte')
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 40f5718c..85118811 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -12,6 +12,7 @@ import Error from '$lib/Error/RateLimited.svelte'; import CleanMangaList from './CleanMangaList.svelte'; import authorisedJson from '$lib/authorised.json'; + import { incrementMediaProgress } from '$lib/Media/Anime/cache'; export let user: AniListAuthorisation; export let identity: UserIdentity; @@ -140,7 +141,8 @@ lastUpdatedMedia = id; await database.chapters.delete(id); - await fetch(`/api/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(() => { + + incrementMediaProgress(id, progress, () => { previousMangaList = media; const foundEntry = media.find((m) => m.id === id); |