Updated simpl-schema and collection2, started untangling the mess that made

This commit is contained in:
Stefan Zermatten
2018-10-12 13:38:51 +02:00
parent e3065f089f
commit 53a1137848
23 changed files with 337 additions and 138 deletions

View File

@@ -1,4 +1,5 @@
Spells = new Mongo.Collection("spells");
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
Schemas.Spell = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
@@ -52,14 +53,10 @@ Schemas.Spell = new SimpleSchema({
defaultValue: "Abjuration",
allowedValues: magicSchools,
},
color: {
type: String,
allowedValues: _.pluck(colorOptions, "key"),
defaultValue: "q",
},
});
Spells.attachSchema(Schemas.Spell);
Attributes.attachSchema(ColorSchema);
Spells.attachBehaviour("softRemovable");
makeChild(Spells); //children of spell lists
@@ -249,4 +246,4 @@ Meteor.methods({
check(charId, String);
copySpell(spellId, "Characters", charId);
},
});
});