Merge pull request #2834 from Akuket/master

Issue #2688
This commit is contained in:
Lauri Ojansivu 2019-12-20 16:12:29 +02:00 committed by GitHub
commit 492ed2bdc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 6 deletions

View file

@ -1,4 +1,15 @@
Meteor.publish('card', cardId => {
check(cardId, String);
return Cards.find({ _id: cardId });
if (process.env.LINKED_CARDS_ENABLED === 'true') {
return Cards.find({ _id: cardId });
} else {
// TODO: test
return Cards.find({
_id: cardId,
linkedId: {$ne: [
null,
''
]}
});
}
});