perf: make single db call

This commit is contained in:
Barış Soner Uşaklı
2022-08-04 15:51:24 -04:00
parent f93a0b83bb
commit d73f0f9ccb

View File

@@ -65,7 +65,7 @@ module.exports = function (User) {
let ips = [];
if (showIps) {
ips = await Promise.all(uids.map(uid => db.getSortedSetRevRange(`uid:${uid}:ip`, 0, -1)));
ips = await db.getSortedSetsMembers(uids.map(uid => `uid:${uid}:ip`));
}
let line = '';