summaryrefslogtreecommitdiffstats
path: root/server/publications/cards.js
blob: f326ea04e7f4b590e9206e5088eb8762cffd1ed0 (plain)
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,
        ''
      ]}
    });
  }
});