|
|
|
@ -3,96 +3,7 @@ const createConnectionController = require("../controllers/createConnectionContr
|
|
|
|
|
|
|
|
|
|
module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
|
|
// fastify.route({
|
|
|
|
|
// method: "POST",
|
|
|
|
|
// url: "/api/createConnections/:customerId",
|
|
|
|
|
// schema: {
|
|
|
|
|
// tags: ["Connections"],
|
|
|
|
|
// description: "This is for cretae New Connection",
|
|
|
|
|
// summary: "This is for cretae New Connection.",
|
|
|
|
|
// params: {
|
|
|
|
|
// required: ["customerId"],
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// customerId: {
|
|
|
|
|
// type: "string",
|
|
|
|
|
// description: "customerId",
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// // body: {
|
|
|
|
|
// // type: "object",
|
|
|
|
|
// // properties: {
|
|
|
|
|
// // tankname: { type: "string" },
|
|
|
|
|
// // inputConnections: {
|
|
|
|
|
// // type: "array",
|
|
|
|
|
// // maxItems: 2500,
|
|
|
|
|
// // items: {
|
|
|
|
|
// // type: "object",
|
|
|
|
|
// // properties: {
|
|
|
|
|
// // inputConnections: { type: "string", default: null },
|
|
|
|
|
// // input_type: { type: "string", default: null },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// // outputConnections: {
|
|
|
|
|
// // type: "array",
|
|
|
|
|
// // maxItems: 2500,
|
|
|
|
|
// // items: {
|
|
|
|
|
// // type: "object",
|
|
|
|
|
// // properties: {
|
|
|
|
|
// // outputConnections: { type: "string", default: null },
|
|
|
|
|
// // output_type: { type: "string", default: null },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// // },
|
|
|
|
|
// body: {
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// tankname: { type: "string" },
|
|
|
|
|
// inputConnections: {
|
|
|
|
|
// type: "array",
|
|
|
|
|
// maxItems: 2500,
|
|
|
|
|
// items: {
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// inputConnections: { type: "string", default: null },
|
|
|
|
|
// input_type: { type: "string", default: null },
|
|
|
|
|
// inputismotor: { type: "boolean", default: true }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// outputConnections: {
|
|
|
|
|
// type: "array",
|
|
|
|
|
// maxItems: 2500,
|
|
|
|
|
// items: {
|
|
|
|
|
// type: "object",
|
|
|
|
|
// properties: {
|
|
|
|
|
// outputConnections: { type: "string", default: null },
|
|
|
|
|
// output_type: { type: "string", default: null },
|
|
|
|
|
// outputismotor: { type: "boolean", default: true }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// security: [
|
|
|
|
|
// {
|
|
|
|
|
// basicAuth: [],
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
// preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
// handler: createConnectionController.createConnections,
|
|
|
|
|
// // onResponse: (request, reply) => {
|
|
|
|
|
// // validationHandler.sendPhoneVerificationCode(request, reply);
|
|
|
|
|
// // },
|
|
|
|
|
// //onResponse: validationHandler.sendPhoneVerificationCode,
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
|
method: "POST",
|
|
|
|
|