diff --git a/rpg-docs/Model/Character/TemporaryHitPoints.js b/rpg-docs/Model/Character/TemporaryHitPoints.js index 4634bc02..5e7bda19 100644 --- a/rpg-docs/Model/Character/TemporaryHitPoints.js +++ b/rpg-docs/Model/Character/TemporaryHitPoints.js @@ -2,6 +2,7 @@ TemporaryHitPoints = new Mongo.Collection("temporaryHitPoints"); Schemas.TemporaryHitPoints = new SimpleSchema({ charId: {type: String, regEx: SimpleSchema.RegEx.Id}, + name: {type: String, optional: true}, maximum: {type: Number, defaultValue: 0}, used: {type: Number, defaultValue: 0}, deleteOnZero:{type: Boolean, defaultValue: true}, @@ -9,9 +10,9 @@ Schemas.TemporaryHitPoints = new SimpleSchema({ type: Date, autoValue: function() { if (this.isInsert) { - return new Date; + return new Date(); } else if (this.isUpsert) { - return {$setOnInsert: new Date}; + return {$setOnInsert: new Date()}; } else { this.unset(); } diff --git a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html index 1719339a..197e54f2 100644 --- a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html +++ b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html @@ -1,6 +1,7 @@