From b6d98da43871767ba0fa9b9729906fbee698633b Mon Sep 17 00:00:00 2001 From: Aayush Krishnan <104081853+krishnan05@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:20:38 +0530 Subject: [PATCH] fix:customer contaoller for active vendors (#6) --- controllers/customerController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/customerController.js b/controllers/customerController.js index 8aaef92..7dc76fc 100644 --- a/controllers/customerController.js +++ b/controllers/customerController.js @@ -39,7 +39,7 @@ exports.getVendors = asyncHandler(async (req, res) => { }); } - const vendors = await Vendor.find(filters) + const vendors = await Vendor.find({...filters, status: 'active'}) .sort(sortOptions) .skip((page - 1) * pageSize) .limit(pageSize);