created alternative mobile number field in tankers

master
varun 3 years ago
parent b558e5b4da
commit a421de16fd

@ -29,6 +29,7 @@ console.log(req.params);
customerId:customerId, customerId:customerId,
tankerName: req.body.tankerName, tankerName: req.body.tankerName,
phoneNumber: req.body.phoneNumber, phoneNumber: req.body.phoneNumber,
alternative_phoneNumber: req.body.alternative_phoneNumber,
typeofwater: req.body.typeofwater, typeofwater: req.body.typeofwater,
capacity: req.body.capacity, capacity: req.body.capacity,
}; };
@ -49,6 +50,7 @@ console.log(req.params);
console.log("thsi true url string"); console.log("thsi true url string");
tankers.tankerName = usertobeInserted.tankerName; tankers.tankerName = usertobeInserted.tankerName;
tankers.phoneNumber = usertobeInserted.phoneNumber; tankers.phoneNumber = usertobeInserted.phoneNumber;
tankers.alternative_phoneNumber = usertobeInserted.alternative_phoneNumber;
tankers.capacity = usertobeInserted.capacity; tankers.capacity = usertobeInserted.capacity;
tankers.typeofwater = usertobeInserted.typeofwater; tankers.typeofwater = usertobeInserted.typeofwater;
tankers.customerId = usertobeInserted.customerId; tankers.customerId = usertobeInserted.customerId;

@ -14,6 +14,7 @@ const tankersSchema = new mongoose.Schema({
customerId: { type: String, default: null }, customerId: { type: String, default: null },
tankerName: { type: String, default: null }, tankerName: { type: String, default: null },
phoneNumber: { type: String, default: null }, phoneNumber: { type: String, default: null },
alternative_phoneNumber: { type: String, default: null },
typeofwater: [{ typeofwater: String}], typeofwater: [{ typeofwater: String}],
capacity: [{ capacity: String}], capacity: [{ capacity: String}],

@ -28,6 +28,7 @@ module.exports = function (fastify, opts, next) {
properties: { properties: {
tankerName: { type: "string" }, tankerName: { type: "string" },
phoneNumber: { type: "string"}, phoneNumber: { type: "string"},
alternative_phoneNumber: { type: "string"},
typeofwater: { typeofwater: {
type: "array", type: "array",
maxItems: 2500, maxItems: 2500,

Loading…
Cancel
Save