Fixed failing tests
This commit is contained in:
@@ -97,7 +97,7 @@ const CreatureSchema = TypedSimpleSchema.from({
|
||||
},
|
||||
'allowedLibraries.$': {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
allowedLibraryCollections: {
|
||||
type: Array,
|
||||
@@ -106,7 +106,7 @@ const CreatureSchema = TypedSimpleSchema.from({
|
||||
},
|
||||
'allowedLibraryCollections.$': {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
|
||||
// Stats that are computed and denormalised outside of recomputation
|
||||
@@ -163,7 +163,7 @@ const CreatureSchema = TypedSimpleSchema.from({
|
||||
tabletopId: {
|
||||
index: 1,
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
optional: true,
|
||||
},
|
||||
initiativeRoll: {
|
||||
@@ -176,17 +176,14 @@ const CreatureSchema = TypedSimpleSchema.from({
|
||||
type: CreatureSettingsSchema,
|
||||
defaultValue: {},
|
||||
},
|
||||
});
|
||||
|
||||
CreatureSchema.extend(ColorSchema);
|
||||
CreatureSchema.extend(SharingSchema);
|
||||
})
|
||||
.extend(ColorSchema)
|
||||
.extend(SharingSchema);
|
||||
|
||||
export type Creature = Simplify<{ _id: string } & InferType<typeof CreatureSchema>>;
|
||||
|
||||
//set up the collection for creatures
|
||||
const Creatures = new Mongo.Collection<Creature>('creatures');
|
||||
|
||||
//@ts-expect-error attachSchema not defined
|
||||
Creatures.attachSchema(CreatureSchema);
|
||||
|
||||
export default Creatures;
|
||||
|
||||
@@ -11,7 +11,7 @@ const changeAllowedLibraries = new ValidatedMethod({
|
||||
schema: new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
allowedLibraries: {
|
||||
type: Array,
|
||||
@@ -20,7 +20,7 @@ const changeAllowedLibraries = new ValidatedMethod({
|
||||
},
|
||||
'allowedLibraries.$': {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
allowedLibraryCollections: {
|
||||
type: Array,
|
||||
@@ -29,7 +29,7 @@ const changeAllowedLibraries = new ValidatedMethod({
|
||||
},
|
||||
'allowedLibraryCollections.$': {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
}),
|
||||
rateLimit: {
|
||||
@@ -58,7 +58,7 @@ const toggleAllUserLibraries = new ValidatedMethod({
|
||||
schema: new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
value: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -21,7 +21,7 @@ const removeCreature = new ValidatedMethod({
|
||||
validate: new SimpleSchema({
|
||||
charId: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
max: 32,
|
||||
},
|
||||
}).validator(),
|
||||
mixins: [RateLimiterMixin],
|
||||
|
||||
Reference in New Issue
Block a user