aboutsummaryrefslogtreecommitdiff
path: root/src/hypixel.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-17 18:36:15 +0000
committermat <github@matdoes.dev>2022-05-17 18:36:15 +0000
commite06358b5b930c90e69dc4a6bddaa2b7f1be640b4 (patch)
tree09da52cce833f59f2e9144bcf73e4575ca847251 /src/hypixel.ts
parentea4a258a5cae4204ec5f3d700fbbda3982040ab7 (diff)
downloadskyblock-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.ts6
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() {