The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/server/publications/activities.js

24 lines
585 B

// We use activities fields at three different places:
// 1. The home page that contains
// 2. The board
// 3.
// We use publish paginate for these three publications.
Meteor.publish('activities', function(mode, id, limit) {
check(mode, Match.Where(function(x) {
return ['board', 'card'].indexOf(x) !== -1;
}));
check(id, String);
check(limit, Number);
var selector = {};
if (mode === 'board')
selector.boardId = id;
else if (mode === 'card')
selector.cardId = id;
return Activities.find(selector, {
sort: {createdAt: -1},
limit: limit
});
});