Move every Users.findOne() to the ReactiveCache

This commit is contained in:
Martin Filser 2023-01-15 01:11:16 +01:00
parent bf48d4371c
commit 6e1ef3d94a
35 changed files with 175 additions and 125 deletions

View file

@ -253,17 +253,17 @@ Swimlanes.helpers({
},
isListTemplatesSwimlane() {
const user = Users.findOne(Meteor.userId());
const user = ReactiveCache.getCurrentUser();
return (user.profile || {}).listTemplatesSwimlaneId === this._id;
},
isCardTemplatesSwimlane() {
const user = Users.findOne(Meteor.userId());
const user = ReactiveCache.getCurrentUser();
return (user.profile || {}).cardTemplatesSwimlaneId === this._id;
},
isBoardTemplatesSwimlane() {
const user = Users.findOne(Meteor.userId());
const user = ReactiveCache.getCurrentUser();
return (user.profile || {}).boardTemplatesSwimlaneId === this._id;
},