fix(anilist): send auth token on search when logged in
AniListSearch hardcoded false for the authenticated flag to AniListQuery, forcing anonymous searches even with a valid AniList session. Pass a.CheckIfAniListLoggedIn() instead so the stored token is attached when available, enabling user-specific data and authenticated rate limits while keeping anonymous search as fallback.
This commit is contained in:
+1
-1
@@ -383,7 +383,7 @@ func (a *App) AniListSearch(query string) (interface{}, error) {
|
|||||||
ListType: "ANIME",
|
ListType: "ANIME",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
returnedBody, status := AniListQuery(body, false)
|
returnedBody, status := AniListQuery(body, a.CheckIfAniListLoggedIn())
|
||||||
if status != "200 OK" {
|
if status != "200 OK" {
|
||||||
return nil, aniListSearchStatusError(status, returnedBody)
|
return nil, aniListSearchStatusError(status, returnedBody)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user