fetching active delivery boys for a particular supplier

master
varun 3 years ago
parent ab270bcc91
commit 68a6786a2e

@ -101,6 +101,7 @@ exports.orderNow = async (req, reply) => {
} }
} }
const insertedagent = await agent.save(); const insertedagent = await agent.save();
return insertedagent; return insertedagent;

@ -99,6 +99,7 @@ const supplierSchema = new mongoose.Schema(
status: { type: String, default: "pending" }, status: { type: String, default: "pending" },
timestamp: { type: Date, default: Date.now } timestamp: { type: Date, default: Date.now }
}); });
const deliveryBoySchema = new mongoose.Schema({ const deliveryBoySchema = new mongoose.Schema({
supplierId:{ type: String, default: null }, supplierId:{ type: String, default: null },

@ -129,6 +129,7 @@ module.exports = function (fastify, opts, next) {
}); });
next(); next();
} }

Loading…
Cancel
Save