|
|
|
@ -53,17 +53,17 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/updateTanks/:InstallerId",
|
|
|
|
|
url: "/api/updateTanks/:customerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Install"],
|
|
|
|
|
summary: "This is for update tank",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["InstallerId"],
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
InstallerId: {
|
|
|
|
|
customerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "InstallerId",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -75,8 +75,8 @@ 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" },
|
|
|
|
|
typeOfWater: { type: "string", default: null },
|
|
|
|
@ -94,36 +94,34 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
// fastify.auth([fastify.operatorAuthenticate]),
|
|
|
|
|
// validationHandler.validatePhoneFormat,
|
|
|
|
|
// ],
|
|
|
|
|
preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.updateTanksInfo,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/deleteTank/:InstallerId",
|
|
|
|
|
url: "/api/deleteTank/:customerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Install"],
|
|
|
|
|
summary: "This is for delete tank",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["InstallerId"],
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
InstallerId: {
|
|
|
|
|
customerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "InstallerId",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
querystring: {
|
|
|
|
|
tankName: {type: 'string'}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
// required: ['phone'],
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
|
|
customerId: { type: "string", default: null },
|
|
|
|
|
|
|
|
|
|
tankLocation: { type: "string", default: null },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|