From ca16d9f4e69fbfdf5c7e6a052e64453d3dc7396f Mon Sep 17 00:00:00 2001 From: varun Date: Mon, 27 Feb 2023 00:40:04 -0500 Subject: [PATCH] made changes in create connections --- src/models/tanks.js | 4 ++-- src/routes/createConnectionsRoute.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/models/tanks.js b/src/models/tanks.js index b7433b28..55761744 100644 --- a/src/models/tanks.js +++ b/src/models/tanks.js @@ -18,8 +18,8 @@ const tanksSchema = new mongoose.Schema({ tankLocation: { type: String, default: null }, connections: { source: { type: String}, - inputConnections: [{ inputConnections: String}], - outputConnections: [{ outputConnections: String}] + inputConnections: [{ inputConnections: String,input_type:String }], + outputConnections: [{ outputConnections: String,output_type:String }] } }); diff --git a/src/routes/createConnectionsRoute.js b/src/routes/createConnectionsRoute.js index 8f189276..5280e075 100644 --- a/src/routes/createConnectionsRoute.js +++ b/src/routes/createConnectionsRoute.js @@ -31,6 +31,7 @@ module.exports = function (fastify, opts, next) { type: "object", properties: { inputConnections: { type: "string", default: null }, + input_type: { type: "string", default: null }, }, }, }, @@ -41,6 +42,7 @@ module.exports = function (fastify, opts, next) { type: "object", properties: { outputConnections: { type: "string", default: null }, + output_type: { type: "string", default: null }, }, }, }, @@ -92,6 +94,7 @@ module.exports = function (fastify, opts, next) { type: "object", properties: { inputConnections: { type: "string", default: null }, + type: { type: "string", default: null }, }, }, }, @@ -102,6 +105,7 @@ module.exports = function (fastify, opts, next) { type: "object", properties: { outputConnections: { type: "string", default: null }, + type: { type: "string", default: null }, }, }, },