mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Move every CardComments.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
806ad78637
commit
92733b24d1
2 changed files with 3 additions and 3 deletions
|
|
@ -285,7 +285,7 @@ if (Meteor.isServer) {
|
||||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||||
JsonRoutes.sendResult(res, {
|
JsonRoutes.sendResult(res, {
|
||||||
code: 200,
|
code: 200,
|
||||||
data: CardComments.findOne({
|
data: ReactiveCache.getCardComment({
|
||||||
_id: paramCommentId,
|
_id: paramCommentId,
|
||||||
cardId: paramCardId,
|
cardId: paramCardId,
|
||||||
boardId: paramBoardId,
|
boardId: paramBoardId,
|
||||||
|
|
@ -332,7 +332,7 @@ if (Meteor.isServer) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const cardComment = CardComments.findOne({
|
const cardComment = ReactiveCache.getCardComment({
|
||||||
_id: id,
|
_id: id,
|
||||||
cardId: paramCardId,
|
cardId: paramCardId,
|
||||||
boardId: paramBoardId,
|
boardId: paramBoardId,
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ if (Meteor.isServer) {
|
||||||
const newComment = data.comment;
|
const newComment = data.comment;
|
||||||
if (paramCardId && paramBoardId && newComment) {
|
if (paramCardId && paramBoardId && newComment) {
|
||||||
// only process data with the cardid, boardid and comment text, TODO can expand other functions here to react on returned data
|
// only process data with the cardid, boardid and comment text, TODO can expand other functions here to react on returned data
|
||||||
const comment = CardComments.findOne({
|
const comment = ReactiveCache.getCardComment({
|
||||||
_id: paramCommentId,
|
_id: paramCommentId,
|
||||||
cardId: paramCardId,
|
cardId: paramCardId,
|
||||||
boardId: paramBoardId,
|
boardId: paramBoardId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue