added backend to cache manga updates requests

This commit is contained in:
wea_ondara
2023-11-20 17:01:37 +01:00
parent 34b0135da7
commit 29e1d2e499
19 changed files with 699 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ import type {AniListMangaListCollection} from '@/data/models/anilist/AniListMang
export default class AniListApi {
async fetchUser(userName: string): Promise<AniListUser> {
const res = fetch('/graphql', {
const res = fetch('/anilist/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -18,7 +18,7 @@ export default class AniListApi {
}
async fetchManga(userId: number): Promise<AniListMangaListCollection> {
const res = fetch('/graphql', {
const res = fetch('/anilist/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@@ -58,7 +58,7 @@ export default class MangaUpdatesDataService {
}
continue;
} finally {
await new Promise((r) => setTimeout(r, 1000));
// await new Promise((r) => setTimeout(r, 1000));
}
matching = results.results
.filter(e => stringSimilarity(title, e.record.title, 2, false) >= 0.95)