diff options
author | mat <github@matdoes.dev> | 2022-07-02 00:02:54 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-07-02 00:02:54 -0500 |
commit | b36aa3475b1918bcbf2b7cfcad661cfb739878c9 (patch) | |
tree | 9535b4fcf821710ac92a2629307b0ea5359ff3e8 /src/hypixel.ts | |
parent | f9a9fa77d6da390ad702e2657ac75485d8678471 (diff) | |
download | skyblock-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.ts | 4 |
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] } /** |