mirror of
https://github.com/wekan/wekan.git
synced 2026-02-19 14:38:06 +01:00
Move every CardCommentReactions.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
f5796faa84
commit
e30edce73e
2 changed files with 52 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ CardComments.helpers({
|
|||
},
|
||||
|
||||
reactions() {
|
||||
const cardCommentReactions = CardCommentReactions.findOne({cardCommentId: this._id});
|
||||
const cardCommentReactions = ReactiveCache.getCardCommentReaction({cardCommentId: this._id});
|
||||
return !!cardCommentReactions ? cardCommentReactions.reactions : [];
|
||||
},
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ CardComments.helpers({
|
|||
return false;
|
||||
} else {
|
||||
|
||||
const cardCommentReactions = CardCommentReactions.findOne({cardCommentId: this._id});
|
||||
const cardCommentReactions = ReactiveCache.getCardCommentReaction({cardCommentId: this._id});
|
||||
const reactions = !!cardCommentReactions ? cardCommentReactions.reactions : [];
|
||||
const userId = Meteor.userId();
|
||||
const reaction = reactions.find(r => r.reactionCodepoint === reactionCodepoint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue