Move every Users.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)

This commit is contained in:
Martin Filser 2023-02-22 22:52:49 +01:00
parent 4d192a0165
commit 81c9bb6899
4 changed files with 13 additions and 12 deletions

View file

@ -329,9 +329,10 @@ Template.commentReactions.helpers({
return Meteor.userId() && userIds.includes(Meteor.userId());
},
userNames(userIds) {
return Users.find({_id: {$in: userIds}})
.map(user => user.profile.fullname)
.join(', ');
const ret = ReactiveCache.getUsers({_id: {$in: userIds}})
.map(user => user.profile.fullname)
.join(', ');
return ret;
}
})