aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/achievements.ts14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/cleaners/achievements.ts b/src/cleaners/achievements.ts
index d556f74..b2e6324 100644
--- a/src/cleaners/achievements.ts
+++ b/src/cleaners/achievements.ts
@@ -8,15 +8,9 @@ interface Achievement {
description: string
}
-export interface Achievements {
- skyblock: Achievement[]
-}
+export type Achievements = Achievement[]
export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataResponse['player']): Promise<Achievements> {
- const playerAchievements: Achievements = {
- skyblock: []
- }
-
const gameAchievements: typedHypixelApi.AchievementsResponse['achievements'] = await fetchAchievements()
for (const [gameId, achievementsData] of Object.entries(gameAchievements)) {
@@ -43,8 +37,10 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe
})
}
- playerAchievements[gameId] = [...tieredAchievements, ...oneTimeAchievements]
+ return [...tieredAchievements, ...oneTimeAchievements]
}
- return playerAchievements
+ // this shouldn't be possible
+ console.debug('skyblock not found in achievements?')
+ return []
}