From 2f65c444a5ff402e41c8b2dae431610b02bd2d5f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 24 Dec 2024 11:13:15 -0800 Subject: fix(wrapped): li::marker consistent colouring --- src/lib/Data/AniList/user.ts | 28 +++++++++++++--------------- src/lib/Data/Static/authorised.json | 5 +---- 2 files changed, 14 insertions(+), 19 deletions(-) (limited to 'src/lib/Data') diff --git a/src/lib/Data/AniList/user.ts b/src/lib/Data/AniList/user.ts index aaab6e0b..19de8c45 100644 --- a/src/lib/Data/AniList/user.ts +++ b/src/lib/Data/AniList/user.ts @@ -46,16 +46,15 @@ export interface FullUser { } export const user = async (username: string, id = false): Promise => { - const response = ( - await ( - await fetch('https://graphql.anilist.co', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json' - }, - body: JSON.stringify({ - query: `{ User(${id ? `id: ${username}` : `name: "${username}"`}) { + const response = await ( + await fetch('https://graphql.anilist.co', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json' + }, + body: JSON.stringify({ + query: `{ User(${id ? `id: ${username}` : `name: "${username}"`}) { name id bannerImage avatar { large medium } statistics { anime { count meanScore minutesWatched episodesWatched @@ -65,13 +64,12 @@ export const user = async (username: string, id = false): Promise = } } } }` - }) }) - ).json() - ) + }) + ).json(); - return response["data"]["User"] === null ? null : response["data"]["User"]; -} + return response['data']['User'] === null ? null : response['data']['User']; +}; export const dumpUser = async (username: string): Promise => ( diff --git a/src/lib/Data/Static/authorised.json b/src/lib/Data/Static/authorised.json index 07c4688f..5aa83801 100644 --- a/src/lib/Data/Static/authorised.json +++ b/src/lib/Data/Static/authorised.json @@ -1,4 +1 @@ -[ - 5678223, - 7035177 -] \ No newline at end of file +[5678223, 7035177] -- cgit v1.2.3