mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-01 02:09:14 +02:00
fix: reversing the order of reports for display purposes
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user