|
|
|
@ -510,67 +510,67 @@ fastify.get("/api/getusersofParticularInstaller", {
|
|
|
|
|
handler: storeController.getusersofParticularInstaller,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/createwaterlevelSensor/:storeId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for creating waterlevel Sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for creating waterlevel Sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["storeId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
storeId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "storeId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// fastify.post("/api/createwaterlevelSensor/:storeId", {
|
|
|
|
|
// schema: {
|
|
|
|
|
// description: "This is for creating waterlevel Sensor",
|
|
|
|
|
// tags: ["Store-Data"],
|
|
|
|
|
// summary: "This is for creating waterlevel Sensor",
|
|
|
|
|
// params: {
|
|
|
|
|
// required: ["storeId"],
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// storeId: {
|
|
|
|
|
// type: "string",
|
|
|
|
|
// description: "storeId",
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
// body: {
|
|
|
|
|
// type: "object",
|
|
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
// properties: {
|
|
|
|
|
|
|
|
|
|
hardwareId: { type: "string" },
|
|
|
|
|
type: { type: "string" },
|
|
|
|
|
indate: { type: "string" },
|
|
|
|
|
hardwareId_company: { type: "string" }
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.createwaterlevelSensor,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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",
|
|
|
|
|
},
|
|
|
|
|
// hardwareId: { type: "string" },
|
|
|
|
|
// type: { type: "string" },
|
|
|
|
|
// indate: { type: "string" },
|
|
|
|
|
// hardwareId_company: { type: "string" }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// handler: storeController.createwaterlevelSensor,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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,
|
|
|
|
|
});
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// 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", {
|
|
|
|
@ -625,37 +625,37 @@ fastify.get("/api/getHardware/:storeId", {
|
|
|
|
|
handler: storeController.getHardware,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/qccheckwaterlevelSensor/:hardwareId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for checking waterlevel Sensor",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for checking waterlevel Sensor",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["hardwareId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "hardwareId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
// fastify.post("/api/qccheckwaterlevelSensor/:hardwareId", {
|
|
|
|
|
// schema: {
|
|
|
|
|
// description: "This is for checking waterlevel Sensor",
|
|
|
|
|
// tags: ["Store-Data"],
|
|
|
|
|
// summary: "This is for checking waterlevel Sensor",
|
|
|
|
|
// params: {
|
|
|
|
|
// required: ["hardwareId"],
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// hardwareId: {
|
|
|
|
|
// type: "string",
|
|
|
|
|
// description: "hardwareId",
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// body: {
|
|
|
|
|
// type: "object",
|
|
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
qccheck: { type: "string" },
|
|
|
|
|
qccheckdate: { type: "string" },
|
|
|
|
|
qcby: { type: "string" },
|
|
|
|
|
comment: { type: "string" },
|
|
|
|
|
outforrepairdate: { type: "string" },
|
|
|
|
|
sendto: { type: "string" },
|
|
|
|
|
repairfeedback: { type: "string" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.qccheckwaterlevelSensor,
|
|
|
|
|
})
|
|
|
|
|
// properties: {
|
|
|
|
|
// qccheck: { type: "string" },
|
|
|
|
|
// qccheckdate: { type: "string" },
|
|
|
|
|
// qcby: { type: "string" },
|
|
|
|
|
// comment: { type: "string" },
|
|
|
|
|
// outforrepairdate: { type: "string" },
|
|
|
|
|
// sendto: { type: "string" },
|
|
|
|
|
// repairfeedback: { type: "string" },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// handler: storeController.qccheckwaterlevelSensor,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.put("/api/getHardwareqc/:storeId", {
|
|
|
|
@ -752,45 +752,45 @@ 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",
|
|
|
|
|
},
|
|
|
|
|
// 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,
|
|
|
|
|
});
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// 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", {
|
|
|
|
|