fix: remove anime key in statistics key
This commit is contained in:
@@ -28,7 +28,10 @@ export function getUser(aniListToken: string) {
|
||||
.request(GetUserQuery, undefined, {
|
||||
Authorization: `Bearer ${aniListToken}`,
|
||||
})
|
||||
.then((data) => data?.Viewer)
|
||||
.then((data) => ({
|
||||
...data?.Viewer,
|
||||
statistics: { ...data?.Viewer?.statistics?.anime },
|
||||
}))
|
||||
.catch((err) => {
|
||||
if (err.response?.status === 401 || err.response?.status === 429) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user