diff options
author | mat <github@matdoes.dev> | 2022-05-19 19:02:48 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-05-19 19:02:48 +0000 |
commit | 6dde7dcc4926288bf710bb40b6807ec596692085 (patch) | |
tree | 258ab81691424599a8d6b9d0957049797fc40d97 /src/cleaners/achievements.ts | |
parent | 6cb86433e0190cdead1e213fa3d11391ba9c56e4 (diff) | |
download | skyblock-api-6dde7dcc4926288bf710bb40b6807ec596692085.tar.gz skyblock-api-6dde7dcc4926288bf710bb40b6807ec596692085.tar.bz2 skyblock-api-6dde7dcc4926288bf710bb40b6807ec596692085.zip |
we only care about sb achievements
Diffstat (limited to 'src/cleaners/achievements.ts')
-rw-r--r-- | src/cleaners/achievements.ts | 14 |
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 [] } |