mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
use order by
This commit is contained in:
@@ -492,12 +492,6 @@ SELECT "_key" k,
|
||||
FROM UNNEST($1::TEXT[]) "_key";`,
|
||||
values: [keys],
|
||||
});
|
||||
// TODO: move this sort into nodebb_get_sorted_set_members_withscores?
|
||||
res.rows.forEach((r) => {
|
||||
if (r && r.m) {
|
||||
r.m.sort((a, b) => a.score - b.score);
|
||||
}
|
||||
});
|
||||
|
||||
return keys.map(k => (res.rows.find(r => r.k === k) || {}).m || []);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user