@ -972,6 +972,7 @@ exports.IotDevice = async (req, reply) => {
tankHeight: tank.tankHeight,
maxLevel: tank.maxLevel,
minLevel: tank.minLevel
}));
// create a new IOttank document with the provided data
@ -107,3 +107,4 @@ const IotData = mongoose.model("IotData", IOttankSchema);
module.exports = {
Tank, MotorData,IotData
}
@ -366,6 +366,7 @@ module.exports = function (fastify, opts, next) {
handler: tanksController.IotDevice
});
fastify.get("/api/APIRead", {
schema: {