diff options
| author | Fuwn <[email protected]> | 2023-09-13 01:46:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-13 01:46:20 -0700 |
| commit | d6fe2c594a170553e9b88efc6338456dfd13391c (patch) | |
| tree | 86732b0cb44ea02a8a329780b120c63e4c561d58 /src/lib | |
| parent | fix(updates): fetch before parse (diff) | |
| download | due.moe-d6fe2c594a170553e9b88efc6338456dfd13391c.tar.xz due.moe-d6fe2c594a170553e9b88efc6338456dfd13391c.zip | |
refactor(anilist): move to api
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/List/Due/MangaList.svelte | 2 | ||||
| -rw-r--r-- | src/lib/anime.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte index eec6da28..b1c7882a 100644 --- a/src/lib/List/Due/MangaList.svelte +++ b/src/lib/List/Due/MangaList.svelte @@ -102,7 +102,7 @@ const updateMedia = async (id: number, progress: number | undefined) => { await chapterDatabase.chapters.delete(id); - await fetch(`/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(() => { + await fetch(`/api/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(() => { mangaLists = mediaListCollection( user, identity, diff --git a/src/lib/anime.ts b/src/lib/anime.ts index c9bba378..3b3b178c 100644 --- a/src/lib/anime.ts +++ b/src/lib/anime.ts @@ -16,7 +16,7 @@ export const cleanCache = (user: AniListAuthorisation, identity: UserIdentity) = }; export const updateMedia = (id: number, progress: number | undefined, callback: () => void) => { - fetch(`/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(callback); + fetch(`/api/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(callback); }; export const totalEpisodes = (anime: Media) => { |