diff options
author | mat <github@matdoes.dev> | 2022-05-17 18:36:15 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-05-17 18:36:15 +0000 |
commit | e06358b5b930c90e69dc4a6bddaa2b7f1be640b4 (patch) | |
tree | 09da52cce833f59f2e9144bcf73e4575ca847251 /src/hypixel.ts | |
parent | ea4a258a5cae4204ec5f3d700fbbda3982040ab7 (diff) | |
download | skyblock-api-e06358b5b930c90e69dc4a6bddaa2b7f1be640b4.tar.gz skyblock-api-e06358b5b930c90e69dc4a6bddaa2b7f1be640b4.tar.bz2 skyblock-api-e06358b5b930c90e69dc4a6bddaa2b7f1be640b4.zip |
fix bug: the play
Diffstat (limited to 'src/hypixel.ts')
-rw-r--r-- | src/hypixel.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts index ce6f8b7..2fdc94d 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -455,7 +455,7 @@ export async function periodicallyFetchRecentlyEndedAuctions() { } let isFetchingAuctionItemList = false -let cachedAuctionItemListData: Map<string, string> | null = null +let cachedAuctionItemListData: Record<string, string> | null = null let nextAuctionItemListUpdate: Date = new Date(0) export async function fetchAuctionItems() { @@ -480,10 +480,10 @@ export async function fetchAuctionItems() { isFetchingAuctionItemList = false if (!itemList) return undefined - cachedAuctionItemListData = itemList + cachedAuctionItemListData = Object.fromEntries(itemList) // updates every 60 minutes nextAuctionItemListUpdate = new Date(Date.now() + 10 * 60 * 1000); - return Object.fromEntries(itemList) + return itemList } async function fetchAuctionItemsUncached() { |