summaryrefslogtreecommitdiffstats
path: root/server/publications/cards.js
blob: f850ccfe1c276301bbf571810fe60b4e29a988c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 });
  });
}