|
|
|
@ -653,6 +653,42 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
handler: tanksController.getLatestData,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "GET",
|
|
|
|
|
url: "/api/changesurveystatus/:customerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Install"],
|
|
|
|
|
summary: "This is for changing survey status",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// querystring: {
|
|
|
|
|
// tankName: {type: 'string'}
|
|
|
|
|
// },
|
|
|
|
|
body: {
|
|
|
|
|
type: 'object',
|
|
|
|
|
properties: {
|
|
|
|
|
survey_status: { type: 'string' },
|
|
|
|
|
},
|
|
|
|
|
required: ['survey_status'],
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.changesurveystatus,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "GET",
|
|
|
|
@ -1116,6 +1152,40 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.consumptionofparticulartank,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/getPendingAndCompletedsurveyOfparticularInstaller/:installationId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Install"],
|
|
|
|
|
summary: "This is for getting pending and completed surveys users of particular installer",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["installationId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
installationId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "InstallationId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
survey_status: { type: "string" },
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tanksController.getPendingAndCompletedsurveyOfparticularInstaller,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
next();
|
|
|
|
|