|
|
|
@ -821,13 +821,54 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
handler: tanksController.deletemotordatarecordsbefore7days,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getTankmotordata", {
|
|
|
|
|
// fastify.get("/api/getTankmotordata", {
|
|
|
|
|
// schema: {
|
|
|
|
|
// tags: ["Tank"],
|
|
|
|
|
// description: "This is for Get Tank Motor Data",
|
|
|
|
|
// summary: "This is for to Get Tank Motor Data",
|
|
|
|
|
// querystring: {
|
|
|
|
|
// customerId: {type: 'string'}
|
|
|
|
|
// },
|
|
|
|
|
// security: [
|
|
|
|
|
// {
|
|
|
|
|
// basicAuth: [],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
// handler: tanksController.getTankmotordata,
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/getTankmotordata/:customerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
description: "This is for Get Tank Motor Data",
|
|
|
|
|
summary: "This is for to Get Tank Motor Data",
|
|
|
|
|
querystring: {
|
|
|
|
|
customerId: {type: 'string'}
|
|
|
|
|
summary: "This is for Get Tank Motor Data",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
// required: ['phone'],
|
|
|
|
|
properties: {
|
|
|
|
|
startDate:{ type: "string" },
|
|
|
|
|
stopDate:{type:"string"},
|
|
|
|
|
block:{type:"string"},
|
|
|
|
|
typeofwater:{type:"string"},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
@ -835,7 +876,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
//preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.getTankmotordata,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -843,6 +884,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.post('/api/motor/write', {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|