|
|
|
@ -1109,6 +1109,25 @@ fastify.post("/api/createwaterlevelSensorintime/:storeId", {
|
|
|
|
|
handler: storeController.createSensor,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
fastify.delete("/api/deleteSensorById/:_id", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "Delete a sensor by ID",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "Delete a sensor based on its _id",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["_id"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
_id: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "Sensor ID",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.deleteSensorById,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/updateSensorById/:_id", {
|
|
|
|
|
schema: {
|
|
|
|
|