|
|
|
@ -53,17 +53,17 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/updateTanks/:customerId",
|
|
|
|
|
url: "/api/updateTanks/:InstallerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
summary: "This is for update tank",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
required: ["InstallerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
InstallerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
description: "InstallerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -75,7 +75,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
type: "object",
|
|
|
|
|
// required: ['phone'],
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
|
|
customerId: { type: "string", default: null },
|
|
|
|
|
tankName: { type: "string", default: null },
|
|
|
|
|
blockName: { type: "string", default: null },
|
|
|
|
|
capacity: { type: "string" },
|
|
|
|
@ -101,17 +101,17 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/deleteTank/:customerId",
|
|
|
|
|
url: "/api/deleteTank/:InstallerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
summary: "This is for delete tank",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
required: ["InstallerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
InstallerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
description: "InstallerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -123,7 +123,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
// required: ['phone'],
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
customerId: { type: "string", default: null },
|
|
|
|
|
tankLocation: { type: "string", default: null },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -140,17 +140,17 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/getConnectionsInfoOfParticularTank/:customerId",
|
|
|
|
|
url: "/api/getConnectionsInfoOfParticularTank/:InstallerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
summary: "This is to get Connections Info Of ParticularTank",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
required: ["InstallerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
InstallerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
description: "InstallerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -159,6 +159,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
type: "object",
|
|
|
|
|
// required: ['phone'],
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: { type: "string", default: null },
|
|
|
|
|
tankName: {type: 'string'},
|
|
|
|
|
tankLocation: { type: "string", default: null },
|
|
|
|
|
|
|
|
|
@ -182,6 +183,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
description: "This is to Get Tank Data",
|
|
|
|
|
summary: "This is to Get Tank Data",
|
|
|
|
|
|
|
|
|
|
querystring: {
|
|
|
|
|
customerId: {type: 'string'}
|
|
|
|
|
},
|
|
|
|
@ -195,6 +197,25 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
handler: tanksController.getTank,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getTanksofParticularInstaller", {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Tank"],
|
|
|
|
|
description: "This is to Get Tank Data of Installer",
|
|
|
|
|
summary: "This is to Get Tank Data of Installer",
|
|
|
|
|
|
|
|
|
|
querystring: {
|
|
|
|
|
InstallerId: {type: 'string'}
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.getTanksofParticularInstaller,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/updateTanklevels/:customerId",
|
|
|
|
|