Collated update methods into an index, fixed typo

This commit is contained in:
Stefan Zermatten
2019-04-01 15:51:11 +02:00
parent a94f437ba8
commit 18493afbbf
3 changed files with 37 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ const updateExperience = new ValidatedMethod({
name: 'Experiences.methods.update',
mixins: [
recomputeCreatureMixin,
ropagateInheritanceUpdateMixin,
propagateInheritanceUpdateMixin,
updateSchemaMixin,
creaturePermissionMixin,
],

View File

@@ -0,0 +1,35 @@
import updateAction from '/imports/api/creature/properties/Actions.js';
import updateAttribute from '/imports/api/creature/properties/Attributes.js';
import updateBuff from '/imports/api/creature/properties/Buff.js';
import updateClass from '/imports/api/creature/properties/Classes.js';
import updateClassLevel from '/imports/api/creature/properties/ClassLevels.js';
import updateDamageMiliplier from '/imports/api/creature/properties/DamageMilipliers.js';
import updateEffect from '/imports/api/creature/properties/Effects.js';
import updateExperience from '/imports/api/creature/properties/Experiences.js';
import updateFeature from '/imports/api/creature/properties/Features.js';
import updateFolder from '/imports/api/creature/properties/Folders.js';
import updateNote from '/imports/api/creature/properties/Notes.js';
import updateProficiency from '/imports/api/creature/properties/Proficiencies.js';
import updateRoll from '/imports/api/creature/properties/Rolls.js';
import updateSkill from '/imports/api/creature/properties/Skills.js';
import updateSpellList from '/imports/api/creature/properties/SpellLists.js';
import updateSpell from '/imports/api/creature/properties/Spells.js';
export default Object.freeze({
actions: updateAction,
attributes: updateAttribute,
buffs: updateBuff,
classs: updateClass,
classLevels: updateClassLevel,
damageMilipliers: updateDamageMiliplier,
effects: updateEffect,
experiences: updateExperience,
features: updateFeature,
folders: updateFolder,
notes: updateNote,
proficienciess: updateProficiency,
rolls: updateRoll,
skills: updateSkill,
spellLists: updateSpellList,
spells: updateSpell,
});

View File

@@ -9,4 +9,4 @@ const docNotFoundError = function({id, collection}){
export default function fetchDocByRef({id, collection}, options){
return getCollectionByName(collection).findOne(id, options) ||
docNotFoundError({id, collection});
};
}