wekan/server/publications/cards.js
2019-11-29 14:48:44 +01:00

15 lines
299 B
JavaScript

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,
''
]}
});
}
});