From 8089a74e89128141ab1e6f8ff83447114b3b846b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jul 2020 15:48:00 -0400 Subject: [PATCH] fix: reversing the order of reports for display purposes --- src/flags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flags.js b/src/flags.js index e47e807d95..bf26d8ba9c 100644 --- a/src/flags.js +++ b/src/flags.js @@ -364,8 +364,8 @@ Flags.create = async function (type, id, uid, reason, timestamp) { Flags.getReports = async function (flagId) { const [reports, reporterUids] = await Promise.all([ - db.getSortedSetRangeWithScores(`flag:${flagId}:reports`, 0, -1), - db.getSortedSetRange(`flag:${flagId}:reporters`, 0, -1), + db.getSortedSetRevRangeWithScores(`flag:${flagId}:reports`, 0, -1), + db.getSortedSetRevRange(`flag:${flagId}:reporters`, 0, -1), ]); await Promise.all(reports.map(async (report, idx) => {