|
|
|
@ -201,6 +201,55 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
//onResponse: validationHandler.sendPhoneVerificationCode,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getBores", {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Supplier"],
|
|
|
|
|
description: "This is for Get Bore Data",
|
|
|
|
|
summary: "This is for to Get Bore Data",
|
|
|
|
|
querystring: {
|
|
|
|
|
customerId: {type: 'string'}
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tankersController.getBores,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "PUT",
|
|
|
|
|
url: "/api/deleteBore/:customerId",
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Supplier"],
|
|
|
|
|
summary: "This is for delete bore",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["customerId"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
customerId: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "customerId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
querystring: {
|
|
|
|
|
boreName: {type: 'string'}
|
|
|
|
|
},
|
|
|
|
|
security: [
|
|
|
|
|
{
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
handler: tankersController.deleteBoreInfo,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|