aboutsummaryrefslogtreecommitdiff
path: root/src/hypixel.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-07-02 00:02:54 -0500
committermat <github@matdoes.dev>2022-07-02 00:02:54 -0500
commitb36aa3475b1918bcbf2b7cfcad661cfb739878c9 (patch)
tree9535b4fcf821710ac92a2629307b0ea5359ff3e8 /src/hypixel.ts
parentf9a9fa77d6da390ad702e2657ac75485d8678471 (diff)
downloadskyblock-api-b36aa3475b1918bcbf2b7cfcad661cfb739878c9.tar.gz
skyblock-api-b36aa3475b1918bcbf2b7cfcad661cfb739878c9.tar.bz2
skyblock-api-b36aa3475b1918bcbf2b7cfcad661cfb739878c9.zip
Improve /auction/:uuid
Diffstat (limited to 'src/hypixel.ts')
-rw-r--r--src/hypixel.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts
index 3569466..7689b55 100644
--- a/src/hypixel.ts
+++ b/src/hypixel.ts
@@ -331,10 +331,12 @@ export async function fetchItemList() {
}
export async function fetchAuctionUncached(uuid: string) {
- return await sendCleanApiRequest(
+ const auctions = await sendCleanApiRequest(
'skyblock/auction',
{ uuid }
)
+ if (!auctions || auctions.auctions.length === 0) return null
+ return auctions.auctions[0]
}
/**