Grouping characters by party now works

closes #75, finally
This commit is contained in:
Stefan Zermatten
2017-07-14 17:09:30 +02:00
parent ac23afac5d
commit 44a1daf6f8
12 changed files with 358 additions and 104 deletions

View File

@@ -4,27 +4,24 @@ Meteor.publish("characterList", function(){
this.ready();
return;
}
return Characters.find(
{
$or: [
{readers: userId},
{writers: userId},
{owner: userId},
]
},
{
fields: {
name: 1,
urlName: 1,
race: 1,
alignment: 1,
gender: 1,
readers: 1,
writers:1,
owner: 1,
color: 1,
picture: 1,
return [
Characters.find(
{$or: [{readers: userId}, {writers: userId}, {owner: userId}]},
{
fields: {
name: 1,
urlName: 1,
race: 1,
alignment: 1,
gender: 1,
readers: 1,
writers:1,
owner: 1,
color: 1,
picture: 1,
}
}
}
);
),
Parties.find({owner: userId}),
];
});