mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
31 lines
583 B
JavaScript
31 lines
583 B
JavaScript
Meteor.publish('card', cardId => {
|
|
check(cardId, String);
|
|
return Cards.find({ _id: cardId });
|
|
});
|
|
|
|
Meteor.publish('myCards', function() {
|
|
const userId = this.userId;
|
|
|
|
return Cards.find(
|
|
{
|
|
archived: false,
|
|
$or: [{ members: userId }, { assignees: userId }],
|
|
},
|
|
{
|
|
fields: {
|
|
_id: 1,
|
|
boardId: 1,
|
|
swimlaneId: 1,
|
|
listId: 1,
|
|
title: 1,
|
|
type: 1,
|
|
sort: 1,
|
|
members: 1,
|
|
assignees: 1,
|
|
},
|
|
// sort: {
|
|
// sort: ['boardId', 'listId', 'sort'],
|
|
// },
|
|
},
|
|
);
|
|
});
|