Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
remove fixes that depended on hive-bedrock-data
Browse files Browse the repository at this point in the history
  • Loading branch information
UCDFiddes committed Jun 16, 2024
1 parent 3f73130 commit ee87a7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/methods/getAllTimeLeaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default async function getAllTimeLeaderboard<G extends Game>(
let response_data = response.data as unknown as Leaderboards<G, Timeframe.AllTime>[];

let processors = getProcessors(game_id, Timeframe.AllTime);
response_data.forEach((statistics) =>
processors.forEach((processor) => processor(statistics as { [key: string]: number }))
);
response_data.forEach((statistics) => processors.forEach((processor) => processor(statistics)));

return {
...response,
Expand Down
2 changes: 1 addition & 1 deletion src/methods/getAllTimeStatistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function getAllTimeStatistics<G extends Game>(
if (response.error) return response;

if (game_id === "all") {
let games = Object.entries(response.data as [string, { [key: string]: any }][]);
let games = Object.entries(response.data);
let output: Partial<AllGameStatisticsPlayer> = {};

for (let [g, stats] of games) {
Expand Down
4 changes: 1 addition & 3 deletions src/methods/getMonthlyLeaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ export default async function getMonthlyLeaderboard<G extends Game>(
let response_data = Object.values(response.data as LeaderboardResponse<G, Timeframe.Monthly>[]);

let processors = getProcessors(game_id, Timeframe.Monthly);
response_data.forEach((statistics) =>
processors.forEach((processor) => processor(statistics as { [key: string]: number }))
);
response_data.forEach((statistics) => processors.forEach((processor) => processor(statistics)));

return {
...response,
Expand Down
2 changes: 1 addition & 1 deletion src/methods/getMonthlyStatistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function getMonthlyStatistics<G extends Game>(
if (response.error) return response;

if (game_id === "all") {
let games = Object.entries(response.data as [string, { [key: string]: any }][]);
let games = Object.entries(response.data);
let output: Partial<AllGameStatistics<Timeframe.Monthly>> = {};

for (let [g, stats] of games) {
Expand Down

0 comments on commit ee87a7f

Please sign in to comment.