diff options
| author | Factiven <[email protected]> | 2023-07-16 22:35:39 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-07-16 22:35:39 +0700 |
| commit | 1eee181e219dfd993d396ac3169e7aad3dd285eb (patch) | |
| tree | 23fe54e9c3f8810f3ac9ab6b29070b4f0d4b9d20 /lib/AniList.js | |
| parent | removed console.log (diff) | |
| download | moopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.tar.xz moopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.zip | |
Update v3.6.4
- Added Manga page with a working tracker for AniList user
- Added schedule component to home page
- Added disqus comment section so you can fight on each other (not recommended)
- Added /id and /en route for english and indonesian subs (id route still work in progress)
Diffstat (limited to 'lib/AniList.js')
| -rw-r--r-- | lib/AniList.js | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/lib/AniList.js b/lib/AniList.js deleted file mode 100644 index f602dad..0000000 --- a/lib/AniList.js +++ /dev/null @@ -1,54 +0,0 @@ -export async function aniListData({ sort, page = 1 }) { - const resAnilist = await fetch(`https://graphql.anilist.co`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - query: ` - query ( - $id: Int - $page: Int - $perPage: Int - $search: String - $sort: [MediaSort] - ) { - Page(page: $page, perPage: $perPage) { - pageInfo { - total - currentPage - lastPage - hasNextPage - perPage - } - media(id: $id, search: $search, sort: $sort type: ANIME) { - id - idMal - title { - romaji - english - } - coverImage { - extraLarge - } - description - } - } - } - `, - variables: { - page: page, - perPage: 15, - sort, - }, - }), - }); - const anilistData = await resAnilist.json(); - const data = anilistData.data.Page.media; - // console.log(resAnilist); - return { - props: { - data, - }, - }; -} |