Skip to content

Commit

Permalink
fix: leftover code for multiple api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
gw2princeps committed Jul 27, 2024
1 parent a9e61b3 commit 7bf9df5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions gw2-ui/src/gw2api/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,6 @@ export default class APICache<T extends { id: Id }> {
this.language;
const res = await fetch(url, FETCH_OPTIONS);

if (res.status === 503) {
api_route.is_available = false;
if (api_routes.find(({ is_available }) => is_available)) {
// If an API route is unavailable, back out and retry the same ids on an alternative route
console.warn(
`The ${api_route.name} is unavailable; switching API routes`,
);
for (const id of ids) {
this.fetched_ids.delete(id);
}
this.requests_inflight--;
this.tryFetch();
return;
}
}
if (res.status === 404) {
// 404 usually means that none of the passed ids are known, which is equivalent to an empty response
response = [];
Expand Down

0 comments on commit 7bf9df5

Please sign in to comment.