aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-07-01 15:16:39 -0500
committermat <github@matdoes.dev>2022-07-01 15:16:39 -0500
commit2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa (patch)
treeee02da73868149f928e9fcc15d93f5fd0fccdc3e
parent4b32a88289083fb4b2b78ca949c1555a404a3390 (diff)
downloadskyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.tar.gz
skyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.tar.bz2
skyblock-api-2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa.zip
Sort auctions by date
-rw-r--r--src/cleaners/skyblock/auctions.ts3
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