mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Move every Users.findOne() to the ReactiveCache
This commit is contained in:
parent
bf48d4371c
commit
6e1ef3d94a
35 changed files with 175 additions and 125 deletions
|
|
@ -20,10 +20,10 @@ Activities.helpers({
|
|||
return ReactiveCache.getBoard(this.oldBoardId);
|
||||
},
|
||||
user() {
|
||||
return Users.findOne(this.userId);
|
||||
return ReactiveCache.getUser(this.userId);
|
||||
},
|
||||
member() {
|
||||
return Users.findOne(this.memberId);
|
||||
return ReactiveCache.getUser(this.memberId);
|
||||
},
|
||||
list() {
|
||||
return ReactiveCache.getList(this.listId);
|
||||
|
|
@ -203,7 +203,7 @@ if (Meteor.isServer) {
|
|||
if (board) {
|
||||
const comment = params.comment;
|
||||
const knownUsers = board.members.map(member => {
|
||||
const u = Users.findOne(member.userId);
|
||||
const u = ReactiveCache.getUser(member.userId);
|
||||
if (u) {
|
||||
member.username = u.username;
|
||||
member.emails = u.emails;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue