diff options
| author | Fuwn <[email protected]> | 2024-12-24 11:13:15 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-12-24 11:13:15 -0800 |
| commit | 2f65c444a5ff402e41c8b2dae431610b02bd2d5f (patch) | |
| tree | 1709db3a55579e5416cb25d8001759b256bf9ffb /src/lib/Data | |
| parent | fix(List): double guard total count setting overlap (diff) | |
| download | due.moe-2f65c444a5ff402e41c8b2dae431610b02bd2d5f.tar.xz due.moe-2f65c444a5ff402e41c8b2dae431610b02bd2d5f.zip | |
fix(wrapped): li::marker consistent colouring
Diffstat (limited to 'src/lib/Data')
| -rw-r--r-- | src/lib/Data/AniList/user.ts | 28 | ||||
| -rw-r--r-- | src/lib/Data/Static/authorised.json | 5 |
2 files changed, 14 insertions, 19 deletions
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<User | null> => { - 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<User | null> = } } } }` - }) }) - ).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<FullUser> => ( 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] |