Skip to content
Snippets Groups Projects

Auth

1 file
+ 6
8
Compare changes
  • Side-by-side
  • Inline
+ 6
8
@@ -49,20 +49,18 @@ SimulationSchema.methods.setInclusionGoals = function (g) {
this.goals_inclusion = g;
};
SimulationSchema.methods.update = function (property, value) {
if (property === "time") this.setTime(value);
if (property === "location") this.setLocation(value);
if (property === "failure_rate") this.setFailureRate(value);
if (property === "goals_care") this.setCareGoals(value);
if (property === "goals_inclusion") this.setInclusionGoals(value);
if (property === 'time') this.setTime(value);
if (property === 'location') this.setLocation(value);
if (property === 'failure_rate') this.setFailureRate(value);
if (property === 'goals_care') this.setCareGoals(value);
if (property === 'goals_inclusion') this.setInclusionGoals(value);
};
SimulationSchema.methods.run = () => {
SimulationSchema.methods.run = function () {
/* Runs the Simulation with given parameters */
// if (!this.name || !this.location || !this.time) {
// console.log('This is supposed to be an error.');
// }
// identify of location type can be tested with instanceof operator.
// Example: if (this.location instanceof locations.city) *Do some stuff*
};
module.exports = mongoose.model('Simulation', SimulationSchema);
Loading