aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media/Anime/cache.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Media/Anime/cache.ts')
-rw-r--r--src/lib/Media/Anime/cache.ts40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/Media/Anime/cache.ts b/src/lib/Media/Anime/cache.ts
index a47a655e..9aabb2ab 100644
--- a/src/lib/Media/Anime/cache.ts
+++ b/src/lib/Media/Anime/cache.ts
@@ -5,27 +5,27 @@ import lastPruneTimes from '$stores/lastPruneTimes';
import type { AniListAuthorisation, UserIdentity } from '../../Data/AniList/identity';
export const cleanCache = (user: AniListAuthorisation, identity: UserIdentity) =>
- mediaListCollection(user, identity, Type.Anime, get(anime), get(lastPruneTimes).anime, {
- forcePrune: true
- });
+ mediaListCollection(user, identity, Type.Anime, get(anime), get(lastPruneTimes).anime, {
+ forcePrune: true
+ });
export const incrementMediaProgress = (
- id: number,
- progress: number | undefined,
- user: AniListAuthorisation,
- callback: () => void
+ id: number,
+ progress: number | undefined,
+ user: AniListAuthorisation,
+ callback: () => void
) => {
- fetch('https://graphql.anilist.co', {
- method: 'POST',
- headers: {
- Authorization: `${user.tokenType} ${user.accessToken}`,
- 'Content-Type': 'application/json',
- Accept: 'application/json'
- },
- body: JSON.stringify({
- query: `mutation { SaveMediaListEntry(mediaId: ${id}, progress: ${
- (progress || 0) + 1
- }) { id } }`
- })
- }).then(callback);
+ fetch('https://graphql.anilist.co', {
+ method: 'POST',
+ headers: {
+ Authorization: `${user.tokenType} ${user.accessToken}`,
+ 'Content-Type': 'application/json',
+ Accept: 'application/json'
+ },
+ body: JSON.stringify({
+ query: `mutation { SaveMediaListEntry(mediaId: ${id}, progress: ${
+ (progress || 0) + 1
+ }) { id } }`
+ })
+ }).then(callback);
};