diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 9bad0786..20c032f1 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -187,7 +187,7 @@ exports.updateTanklevels = async (req, reply) => { // waterLevel = newWaterLevel; - }, 2000); + }, 5000); intervals[tankId] = intervalId; } diff --git a/src/models/tanks.js b/src/models/tanks.js index 1f64770c..83274ac9 100644 --- a/src/models/tanks.js +++ b/src/models/tanks.js @@ -42,7 +42,7 @@ const tanksSchema = new mongoose.Schema({ waterlevel: { type: String, default: "0" }, tankLocation: { type: String, default: null }, motor_status: { type: String, default: "0" }, - waterlevel_at_midnight:{ type: String }, + waterlevel_at_midnight:{ type: String,default:"0" }, connections: { source: { type: String }, inputConnections: [