reverted code from jayesh home last visited 25-01-2025

master^2
Varun 9 months ago
parent 1b60e2eab0
commit 5370ebf149

File diff suppressed because it is too large Load Diff

@ -821,54 +821,13 @@ module.exports = function (fastify, opts, next) {
handler: tanksController.deletemotordatarecordsbefore7days,
});
// 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",
fastify.get("/api/getTankmotordata", {
schema: {
tags: ["Tank"],
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"},
},
description: "This is for Get Tank Motor Data",
summary: "This is for to Get Tank Motor Data",
querystring: {
customerId: {type: 'string'}
},
security: [
{
@ -876,7 +835,7 @@ module.exports = function (fastify, opts, next) {
},
],
},
//preHandler: fastify.auth([fastify.authenticate]),
preHandler: fastify.auth([fastify.authenticate]),
handler: tanksController.getTankmotordata,
});
@ -884,7 +843,6 @@ module.exports = function (fastify, opts, next) {
fastify.post('/api/motor/write', {
schema: {
tags: ["Tank"],
@ -1112,7 +1070,6 @@ module.exports = function (fastify, opts, next) {
auto_min_percentage: { type: "string", default: null },
auto_max_percentage: { type: "string", default: null },
tankLocation: { type: "string", default: null },
auto_mode_type: { type: "string", default: "default" },
},
},
@ -1231,71 +1188,6 @@ module.exports = function (fastify, opts, next) {
});
fastify.route({
method: "PUT",
url: "/api/updatetankstatus/:customerId",
schema: {
tags: ["Tank"],
summary: "This is for updating tank status to active or inactive",
params: {
required: ["customerId"],
type: "object",
properties: {
customerId: {
type: "string",
description: "customerId",
},
},
},
body: {
type: "object",
// required: ['phone'],
properties: {
tankName:{ type: "string" },
tankLocation:{type:"string"},
status:{type:"string"},
},
},
security: [
{
basicAuth: [],
},
],
},
//preHandler: fastify.auth([fastify.authenticate]),
handler: tanksController.updatetankstatus,
});
// fastify.route({
// method: "GET",
// url: "/api/listofactiveandinactivetankstatus/:customerId",
// schema: {
// tags: ["Tank"],
// summary: "Get list of active or inactive tanks",
// params: {
// required: ["customerId"],
// type: "object",
// properties: {
// customerId: { type: "string", description: "Customer ID" },
// },
// },
// querystring: {
// type: "object",
// properties: {
// status: { type: "string"},
// },
// },
// security: [{ basicAuth: [] }],
// },
// handler: tanksController.listofactiveandinactivetankstatus,
// });
next();
}

Loading…
Cancel
Save