Implemented a javascript code style
This commit is contained in:
@@ -5,16 +5,16 @@ Migrations.add({
|
||||
//convert proficiency effects to proficiency objects
|
||||
Effects.find({operation: "proficiency"}).forEach(function(effect){
|
||||
var type = "skill";
|
||||
if(_.contains(SAVES, effect.stat)) type = "save";
|
||||
if (_.contains(SAVES, effect.stat)) type = "save";
|
||||
Proficiencies.insert({
|
||||
charId: effect.charId,
|
||||
name: effect.stat,
|
||||
value: effect.value,
|
||||
parent: _.clone(effect.parent),
|
||||
type: type,
|
||||
enabled: effect.enabled
|
||||
enabled: effect.enabled,
|
||||
}, function(err){
|
||||
if(!err) Effects.remove(effect._id);
|
||||
if (!err) Effects.remove(effect._id);
|
||||
});
|
||||
});
|
||||
//store type as a parent group if it's needed
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Meteor.publish("characterList",function(userId){
|
||||
if(!userId) {
|
||||
Meteor.publish("characterList", function(userId){
|
||||
if (!userId) {
|
||||
this.ready();
|
||||
return;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ Meteor.publish("characterList",function(userId){
|
||||
$or: [
|
||||
{readers: userId},
|
||||
{writers: userId},
|
||||
{owner: userId}
|
||||
{owner: userId},
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Meteor.publish("singleCharacter", function(characterId, userId){
|
||||
if(
|
||||
if (
|
||||
Characters.findOne({
|
||||
_id: characterId,
|
||||
$or: [
|
||||
{readers: userId},
|
||||
{writers: userId},
|
||||
{owner: userId}
|
||||
]
|
||||
{owner: userId},
|
||||
],
|
||||
})
|
||||
){
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user