In tankerschema side add price and changes

master
Bhaskara Kishore 3 years ago
parent 8d57fc40ef
commit c66f1fcba6

@ -35,6 +35,7 @@ console.log(req.params);
alternative_phoneNumber: req.body.alternative_phoneNumber,
typeofwater: req.body.typeofwater,
capacity: req.body.capacity,
price: req.body.price
};
console.log(req.body.typeofwater,req.body.capacity)
@ -59,6 +60,7 @@ console.log(req.params);
tankers.capacity = usertobeInserted.capacity;
tankers.typeofwater = usertobeInserted.typeofwater;
tankers.supplierId = usertobeInserted.supplierId;
tankers.price = usertobeInserted.price;
}
}
const insertedTanker = await tankers.save();

@ -15,10 +15,17 @@ 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: {
type: [String],
default: []
},
capacity: { type: String},
supplier_address: { type: String, default: null },
supplier_name : { type: String, default: null },
price: {
type: [String],
default: []
},
});

@ -33,6 +33,7 @@ module.exports = function (fastify, opts, next) {
alternative_phoneNumber: { type: "string"},
typeofwater: { type: "string"},
capacity: { type: "string"},
price: {type : "string"}
},
},

Loading…
Cancel
Save