|
|
|
@ -155,6 +155,64 @@ fastify.post("/api/createwaterlevelSensor/:storeId", {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.put("/api/editwaterlevelSensor/:storeId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for editing a water level sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for editing a water level sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["storeId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
storeId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "storeId",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: { type: "string" },
|
|
|
|
|
type: { type: "string" },
|
|
|
|
|
indate: { type: "string" },
|
|
|
|
|
hardwareId_company: { type: "string" }
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.editWaterLevelSensor,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.delete("/api/deletewaterlevelSensor/:storeId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for deleting a water level sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for deleting a water level sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["storeId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
storeId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "storeId",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: { type: "string" },
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.deleteWaterLevelSensor,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getHardware/:storeId", {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
@ -307,6 +365,73 @@ fastify.post("/api/addSlave/:hardwareId", {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.put("/api/editSlave/:hardwareId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for editing a slave of a water level sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for editing a slave of a water level sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["hardwareId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "Main hardware ID",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
tankhardwareId: { type: "string" },
|
|
|
|
|
type: { type: "string" },
|
|
|
|
|
indate: { type: "string" },
|
|
|
|
|
hardwareId_company: { type: "string" },
|
|
|
|
|
qccheck: { type: "string", default: null },
|
|
|
|
|
qccheckdate: { type: "string", default: null },
|
|
|
|
|
qcby: { type: "string", default: null },
|
|
|
|
|
comment: { type: "string", default: "0" },
|
|
|
|
|
outforrepairdate: { type: "string", default: "0" },
|
|
|
|
|
sendto: { type: "string", default: null },
|
|
|
|
|
repairfeedback: { type: "string", default: "0" },
|
|
|
|
|
dateofinstallation: { type: "string", default: null },
|
|
|
|
|
installedby: { type: "string", default: "0" },
|
|
|
|
|
customerId: { type: "string", default: "0" },
|
|
|
|
|
comments: { type: "string", default: "0" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.editSlave,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.delete("/api/deleteSlave/:hardwareId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for deleting a slave of a water level sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for deleting a slave of a water level sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["hardwareId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "Main hardware ID",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
tankhardwareId: { type: "string" },
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.deleteSlave,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/qccheckwaterlevelslaveSensor/:storeId", {
|
|
|
|
|
schema: {
|
|
|
|
|