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 @@
SpellLists = new Mongo.Collection("spellLists");
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
Schemas.SpellLists = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
@@ -7,15 +8,11 @@ Schemas.SpellLists = new SimpleSchema({
saveDC: {type: String, optional: true, trim: false},
attackBonus: {type: String, optional: true, trim: false},
maxPrepared: {type: String, optional: true, trim: false},
color: {
type: String,
allowedValues: _.pluck(colorOptions, "key"),
defaultValue: "q",
},
"settings.showUnprepared": {type: Boolean, defaultValue: true},
});
SpellLists.attachSchema(Schemas.SpellLists);
Attributes.attachSchema(ColorSchema);
SpellLists.helpers({
numPrepared: function(){