summaryrefslogtreecommitdiffstats
path: root/client/config/blazeHelpers.js
blob: 12990ed7f898f379bab895a23ccbbc29afa46b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Blaze.registerHelper('currentBoard', () => {
  const boardId = Session.get('currentBoard');
  if (boardId) {
    return Boards.findOne(boardId);
  }
});

Blaze.registerHelper('currentCard', () => {
  const cardId = Session.get('currentCard');
  if (cardId) {
    return Cards.findOne(cardId);
  }
});

Blaze.registerHelper('getUser', (userId) => Users.findOne(userId));