1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Meteor.publish('card', cardId => { check(cardId, String); if (process.env.LINKED_CARDS_ENABLED === 'true') { return Cards.find({ _id: cardId }); } else { // TODO: test return Cards.find({ _id: cardId, linkedId: {$ne: [ null, '' ]} }); } });