From 87f8c1484e7f07f67cbeead5ef398cff2735b276 Mon Sep 17 00:00:00 2001 From: varun Date: Mon, 7 Aug 2023 22:29:56 -0400 Subject: [PATCH] made changes in iot create data --- src/controllers/tanksController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 5daa4320..6d39aed1 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -959,6 +959,7 @@ exports.calculateCapacity = async (req, reply) => { + exports.IotDevice = async (req, reply) => { try { const { hardwareId, mode, tanks } = req.body; @@ -978,6 +979,7 @@ exports.IotDevice = async (req, reply) => { time: time })); + // create a new IotData document with the provided data const ottank = new IotData({ hardwareId, mode, tanks: tankDocuments, date, time });