Files
DiceCloud/rpg-docs/server/publications/characterList.js
2015-04-29 12:25:51 +02:00

29 lines
384 B
JavaScript

Meteor.publish("characterList", function(){
var userId = this.userId;
if (!userId) {
this.ready();
return;
}
return Characters.find(
{
$or: [
{readers: userId},
{writers: userId},
{owner: userId},
]
},
{
fields: {
name: 1,
race: 1,
alignment: 1,
gender: 1,
readers: 1,
writers:1,
owner: 1,
color: 1,
}
}
);
});