From d6516b5b5d8ecce0b872c87ce6dff65b42abe694 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 18 May 2022 17:51:27 +0000 Subject: better auction sorting --- src/database.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/database.ts b/src/database.ts index e31794a..2cbab72 100644 --- a/src/database.ts +++ b/src/database.ts @@ -1138,7 +1138,8 @@ function toItemAuctionsSchemaBson(i: ItemAuctionsSchema): ItemAuctionsSchemaBson id: createUuid(a.id) } }), - oldestDate: i.auctions[0]?.ts ?? 0 + // we sort by oldestDate to get the volume sold, but we don't want brand new items with like no data having a high frequency + oldestDate: i.auctions.length > 10 ? i.auctions[0]?.ts ?? 0 : 0 } } -- cgit