Condensed publication of single character, included spells
This commit is contained in:
@@ -22,10 +22,6 @@ Router.map( function () {
|
||||
waitOn: function(){
|
||||
return [
|
||||
Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId()),
|
||||
Meteor.subscribe("characterContainers", this.params._id, Meteor.userId()),
|
||||
Meteor.subscribe("characterItems", this.params._id, Meteor.userId()),
|
||||
Meteor.subscribe("characterFeatures", this.params._id, Meteor.userId()),
|
||||
Meteor.subscribe("characterEffects", this.params._id, Meteor.userId()),
|
||||
];
|
||||
},
|
||||
data: function() {
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
Meteor.publish("singleCharacter", function(characterId, userId){
|
||||
//TODO check if this characer can be viewed by this user
|
||||
return Characters.find({_id: characterId});
|
||||
});
|
||||
|
||||
Meteor.publish("characterContainers", function(characterId, userId){
|
||||
return Containers.find({charId: characterId});
|
||||
});
|
||||
|
||||
Meteor.publish("characterItems", function(characterId, userId){
|
||||
return Items.find({charId: characterId});
|
||||
});
|
||||
|
||||
Meteor.publish("characterFeatures", function(characterId, userId){
|
||||
return Features.find({charId: characterId});
|
||||
});
|
||||
|
||||
Meteor.publish("characterEffects", function(characterId, userId){
|
||||
return Effects.find({charId: characterId});
|
||||
});
|
||||
return [
|
||||
Characters.find({_id: characterId}),
|
||||
Containers.find({charId: characterId}),
|
||||
Items.find({charId: characterId}),
|
||||
Features.find({charId: characterId}),
|
||||
Effects.find({charId: characterId}),
|
||||
Spells.find({charId: characterId}),
|
||||
SpellLists.find({charID: characterId})
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user