diff --git a/src/models/tankers.js b/src/models/tankers.js index 4ed67417..bad820b5 100644 --- a/src/models/tankers.js +++ b/src/models/tankers.js @@ -15,8 +15,8 @@ const tankersSchema = new mongoose.Schema({ tankerName: { type: String, default: null }, phoneNumber: { type: String, default: null }, alternative_phoneNumber: { type: String, default: null }, - typeofwater: [{ typeofwater: String}], - capacity: [{ capacity: String}], + typeofwater: { typeofwater: String}, + capacity: { capacity: String}, supplier_address: { type: String, default: null }, supplier_name : { type: String, default: null }, diff --git a/src/routes/tankersRoute.js b/src/routes/tankersRoute.js index 86cb3ef6..53344e6b 100644 --- a/src/routes/tankersRoute.js +++ b/src/routes/tankersRoute.js @@ -31,30 +31,9 @@ module.exports = function (fastify, opts, next) { tankerName: { type: "string" }, phoneNumber: { type: "string"}, alternative_phoneNumber: { type: "string"}, - typeofwater: { - type: "array", - maxItems: 2500, - items: { - type: "object", - properties: { - typeofwater: { type: "string", default: null }, - }, - }, - }, + typeofwater: { type: "string"}, + capacity: { type: "string"}, - capacity: { - type: "array", - maxItems: 2500, - items: { - type: "object", - properties: { - capacity: { type: "string", default: null }, - }, - }, - }, - - - }, }, security: [