|
|
@ -10,9 +10,9 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
method: "POST",
|
|
|
|
method: "POST",
|
|
|
|
url: "/api/addTankers",
|
|
|
|
url: "/api/addTankers",
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Tanker"],
|
|
|
|
tags: ["Supplier"],
|
|
|
|
description: "This is for cretae New Tanker",
|
|
|
|
description: "This is to cretae New Tanker",
|
|
|
|
summary: "This is for Create New Tanker.",
|
|
|
|
summary: "This is to Create New Tanker.",
|
|
|
|
body: {
|
|
|
|
body: {
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
|
properties: {
|
|
|
|
properties: {
|
|
|
@ -43,8 +43,8 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
method: "PUT",
|
|
|
|
method: "PUT",
|
|
|
|
url: "/api/updateTankers/:tankerName",
|
|
|
|
url: "/api/updateTankers/:tankerName",
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Tanker"],
|
|
|
|
tags: ["Supplier"],
|
|
|
|
summary: "This is for update tanker",
|
|
|
|
summary: "This is to update tanker",
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|
required: ["tankerName"],
|
|
|
|
required: ["tankerName"],
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
@ -84,8 +84,8 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
method: "PUT",
|
|
|
|
method: "PUT",
|
|
|
|
url: "/api/deleteTanker/:tankerName",
|
|
|
|
url: "/api/deleteTanker/:tankerName",
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Tanker"],
|
|
|
|
tags: ["Supplier"],
|
|
|
|
summary: "This is for delete tanker",
|
|
|
|
summary: "This is to delete tanker",
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|
required: ["tankerName"],
|
|
|
|
required: ["tankerName"],
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
@ -113,7 +113,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
method: "POST",
|
|
|
|
method: "POST",
|
|
|
|
url: "/api/bookingData",
|
|
|
|
url: "/api/bookingData",
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Tanker"],
|
|
|
|
tags: ["Supplier"],
|
|
|
|
description: "This is for storing booking data of a Tanker",
|
|
|
|
description: "This is for storing booking data of a Tanker",
|
|
|
|
summary: "This is for storing booking data of a Tanker",
|
|
|
|
summary: "This is for storing booking data of a Tanker",
|
|
|
|
body: {
|
|
|
|
body: {
|
|
|
@ -145,7 +145,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getTankers", {
|
|
|
|
fastify.get("/api/getTankers", {
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Tanker"],
|
|
|
|
tags: ["Supplier"],
|
|
|
|
description: "This is for Get Tanker Data",
|
|
|
|
description: "This is for Get Tanker Data",
|
|
|
|
summary: "This is for to Get Tanker Data",
|
|
|
|
summary: "This is for to Get Tanker Data",
|
|
|
|
querystring: {
|
|
|
|
querystring: {
|
|
|
@ -161,6 +161,36 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
handler: tankersController.getTanker,
|
|
|
|
handler: tankersController.getTanker,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
|
|
|
method: "POST",
|
|
|
|
|
|
|
|
url: "/api/addBores",
|
|
|
|
|
|
|
|
schema: {
|
|
|
|
|
|
|
|
tags: ["Supplier"],
|
|
|
|
|
|
|
|
description: "This is to cretae New Bore",
|
|
|
|
|
|
|
|
summary: "This is to Create New Bore.",
|
|
|
|
|
|
|
|
body: {
|
|
|
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
|
|
|
boreName: { type: "string" },
|
|
|
|
|
|
|
|
typeofwater: { type: "string" },
|
|
|
|
|
|
|
|
description: { type: "string" },
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
security: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
|
|
|
handler: tankersController.addBores,
|
|
|
|
|
|
|
|
// onResponse: (request, reply) => {
|
|
|
|
|
|
|
|
// validationHandler.sendPhoneVerificationCode(request, reply);
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
//onResponse: validationHandler.sendPhoneVerificationCode,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|