aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Data
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-12-24 11:13:15 -0800
committerFuwn <[email protected]>2024-12-24 11:13:15 -0800
commit2f65c444a5ff402e41c8b2dae431610b02bd2d5f (patch)
tree1709db3a55579e5416cb25d8001759b256bf9ffb /src/lib/Data
parentfix(List): double guard total count setting overlap (diff)
downloaddue.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.ts28
-rw-r--r--src/lib/Data/Static/authorised.json5
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]