From 2e07a216c9ceda04dc6f11708f5adf0e5f4c85aa Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 1 Jul 2022 15:16:39 -0500 Subject: Sort auctions by date --- src/cleaners/skyblock/auctions.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cleaners') 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 -- cgit