Bhaskara Kishore 3 years ago
commit 21b384c6ac

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

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

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

Loading…
Cancel
Save