Skip to content
Snippets Groups Projects
Commit 68018f8f authored by Rudolf Copi Eckelberg's avatar Rudolf Copi Eckelberg
Browse files

Minor syntax changes

parent 56cee352
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!25Auth
......@@ -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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment