From 0a1e7006b38979fe40653834aa037341c6ac3355 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Fri, 29 Nov 2019 14:48:44 +0100 Subject: Using LINKED_CARDS_ENABLED --- server/publications/cards.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/publications/cards.js b/server/publications/cards.js index 61210ce5..f326ea04 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -1,4 +1,15 @@ Meteor.publish('card', cardId => { check(cardId, String); - return Cards.find({ _id: cardId }); + if (process.env.LINKED_CARDS_ENABLED === 'true') { + return Cards.find({ _id: cardId }); + } else { + // TODO: test + return Cards.find({ + _id: cardId, + linkedId: {$ne: [ + null, + '' + ]} + }); + } }); -- cgit v1.2.3-1-g7c22