From f9a4ef7b4e2d2a28aa82b6b2f6077cd15e05c67e Mon Sep 17 00:00:00 2001 From: varun Date: Tue, 30 May 2023 03:10:28 -0400 Subject: [PATCH] made changes in tankscontroller --- src/controllers/tanksController.js | 2 +- src/models/tanks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: [