diff options
author | mat <github@matdoes.dev> | 2022-03-30 18:19:26 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-30 18:19:26 +0000 |
commit | c1a8716cfcefa8a46a4ddc065fb6910461a856d7 (patch) | |
tree | 1dc5328dff5ab923ca27e9c9df5c69c487a79671 /src | |
parent | 0646d0904d92e88358fbeb53fd15bd59f03d461a (diff) | |
download | skyblock-api-c1a8716cfcefa8a46a4ddc065fb6910461a856d7.tar.gz skyblock-api-c1a8716cfcefa8a46a4ddc065fb6910461a856d7.tar.bz2 skyblock-api-c1a8716cfcefa8a46a4ddc065fb6910461a856d7.zip |
clean item ids better
Diffstat (limited to 'src')
-rw-r--r-- | src/cleaners/skyblock/farmingContents.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/farmingContents.ts b/src/cleaners/skyblock/farmingContents.ts index e6bb989..825c1a9 100644 --- a/src/cleaners/skyblock/farmingContents.ts +++ b/src/cleaners/skyblock/farmingContents.ts @@ -1,4 +1,5 @@ import typedHypixelApi from 'typed-hypixel-api' +import { cleanItemId } from './itemId' export interface PlayerFarmingContestStats { year: number @@ -35,7 +36,7 @@ export function cleanFarmingContests(data: typedHypixelApi.SkyBlockProfileMember const [month, day] = monthDay.split('_') const contestByDateKey = `${year}:${month}:${day}` const cropData: PlayerFarmingContestStats['crops'][number] = { - item: item.toLowerCase(), + item: cleanItemId(item), amount: contestData.collected, // the api returns the position 0-indexed, so we add 1 position: contestData.claimed_position ? contestData.claimed_position + 1 : null, |