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 }, }, }, },