From 7ec394bc98bc98c5c50c64e3c9985f987aba4081 Mon Sep 17 00:00:00 2001 From: varun Date: Mon, 20 Mar 2023 03:22:05 -0400 Subject: [PATCH] made changes in tanker --- src/models/tankers.js | 4 ++-- src/routes/tankersRoute.js | 25 ++----------------------- 2 files changed, 4 insertions(+), 25 deletions(-) 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: [