diff options
Diffstat (limited to 'server/publications/cards.js')
-rw-r--r-- | server/publications/cards.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/server/publications/cards.js b/server/publications/cards.js index f326ea04..f850ccfe 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -1,15 +1,17 @@ -Meteor.publish('card', cardId => { - check(cardId, String); - if (process.env.LINKED_CARDS_ENABLED === 'true') { +if (process.env.LINKED_CARDS_ENABLED === 'false') { + Meteor.settings.public.linkedCardsEnabled = 'false'; + //Meteor.publish('card', cardId => { + // check(cardId, String); + // // TODO: test + // return Cards.find({ + // _id: cardId, + // linkedId: { $ne: [null, ''] }, + // }); + //}); +} else { + Meteor.settings.public.linkedCardsEnabled = 'true'; + Meteor.publish('card', cardId => { + check(cardId, String); return Cards.find({ _id: cardId }); - } else { - // TODO: test - return Cards.find({ - _id: cardId, - linkedId: {$ne: [ - null, - '' - ]} - }); - } -}); + }); +} |