diff options
author | mat <github@matdoes.dev> | 2022-07-01 15:16:39 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-07-01 15:16:39 -0500 |
commit | 2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa (patch) | |
tree | ee02da73868149f928e9fcc15d93f5fd0fccdc3e /src/cleaners/skyblock/auctions.ts | |
parent | 4b32a88289083fb4b2b78ca949c1555a404a3390 (diff) | |
download | skyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.tar.gz skyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.tar.bz2 skyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.zip |
Sort auctions by date
Diffstat (limited to 'src/cleaners/skyblock/auctions.ts')
-rw-r--r-- | src/cleaners/skyblock/auctions.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cleaners/skyblock/auctions.ts b/src/cleaners/skyblock/auctions.ts index 7812ce6..81a5475 100644 --- a/src/cleaners/skyblock/auctions.ts +++ b/src/cleaners/skyblock/auctions.ts @@ -30,6 +30,9 @@ export async function cleanAuctions(data: typedHypixelApi.SkyBlockRequestAuction }) } + // sort by newer first + auctions.sort((a, b) => b.creationTimestamp - a.creationTimestamp) + return auctions }
\ No newline at end of file |