From bb8cdf13a2856649e815196abd11379f1f57234e Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 2 Feb 2021 02:22:26 -0500 Subject: [PATCH 1/2] fixes --- src/api/comm.libraryofcode.org/routes/report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/comm.libraryofcode.org/routes/report.ts b/src/api/comm.libraryofcode.org/routes/report.ts index 60e3197..03a275b 100644 --- a/src/api/comm.libraryofcode.org/routes/report.ts +++ b/src/api/comm.libraryofcode.org/routes/report.ts @@ -551,7 +551,7 @@ export default class Report extends Route { notify: score.notify, locked: !!score.locked, totalModerations: moderations?.length > 0 ? moderations.length : 0, - inquiries: hardInquiries?.length > 0 ? hardInquiries : [], + inquiries: hardInquiries?.length > 0 ? hardInquiries.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()) : [], softInquiries: softInquiries?.length > 0 ? softInquiries : [], historical: historical ?? [], lastUpdated: score.lastUpdate, From c86663518e0d3ef9dc9b2eb0e1cc930d3fd80f2b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 2 Feb 2021 02:22:40 -0500 Subject: [PATCH 2/2] fixes --- src/api/comm.libraryofcode.org/routes/report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/comm.libraryofcode.org/routes/report.ts b/src/api/comm.libraryofcode.org/routes/report.ts index 03a275b..397acf4 100644 --- a/src/api/comm.libraryofcode.org/routes/report.ts +++ b/src/api/comm.libraryofcode.org/routes/report.ts @@ -552,7 +552,7 @@ export default class Report extends Route { locked: !!score.locked, totalModerations: moderations?.length > 0 ? moderations.length : 0, inquiries: hardInquiries?.length > 0 ? hardInquiries.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()) : [], - softInquiries: softInquiries?.length > 0 ? softInquiries : [], + softInquiries: softInquiries?.length > 0 ? softInquiries.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()) : [], historical: historical ?? [], lastUpdated: score.lastUpdate, });