Bhaskara Kishore 3 years ago
commit 21b384c6ac

@ -556,13 +556,13 @@ exports.connectionStatus = async (req, reply) => {
exports.connectstatus = async (req, reply) => { exports.connectstatus = async (req, reply) => {
try { try {
const customerId = req.params.customerId; const customerId = req.params.customerId;
const supplierId = req.query.supplierId; const supplierId = req.query.supplierId;
const receiverId = mongoose.Types.ObjectId(supplierId); console.log(req.params.customerId)
const data = await FriendRequest.findOne({ sender: customerId, receiver: receiverId }); console.log(req.query.supplierId)
const data = await FriendRequest.findOne({ customerId: customerId, supplierId: supplierId });
let connection_status = "not requested"; let connection_status = "not requested";
if (data) { if (data) {
connection_status = data.status; connection_status = data.status;
@ -572,3 +572,5 @@ exports.connectstatus = async (req, reply) => {
throw boom.boomify(err); throw boom.boomify(err);
} }
}; };

@ -78,6 +78,7 @@ const GovtPipeLineSchema = new mongoose.Schema({
const Tanker = mongoose.model("Tanker", tankersSchema); const Tanker = mongoose.model("Tanker", tankersSchema);
const Tankerbooking = mongoose.model("Tankerbooking", tankersbookingSchema); const Tankerbooking = mongoose.model("Tankerbooking", tankersbookingSchema);
const Bore = mongoose.model("Bore", boreSchema); const Bore = mongoose.model("Bore", boreSchema);

@ -629,6 +629,7 @@ module.exports = function (fastify, opts, next) {
querystring: { querystring: {
supplierId: {type: 'string'} supplierId: {type: 'string'}
}, },
security: [ security: [
{ {
basicAuth: [], basicAuth: [],

Loading…
Cancel
Save