From d0e70ee419fcf6609de1ca1516cc3abb446dd9f1 Mon Sep 17 00:00:00 2001 From: Aditya062003 Date: Wed, 10 Apr 2024 00:18:39 +0530 Subject: [PATCH] fix: getVendors --- controllers/customerController.js | 2 +- models/vendor.model.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/customerController.js b/controllers/customerController.js index 45b84da..6870eeb 100644 --- a/controllers/customerController.js +++ b/controllers/customerController.js @@ -20,7 +20,7 @@ exports.getVendors = asyncHandler(async (req, res) => { } = req.query; const filters = {}; if (primary_location) { - filters.location_served = { $in: [primary_location] }; + filters.supported_location = { $in: [primary_location] }; } if (tag) { filters.tags = { $in: [tag] }; diff --git a/models/vendor.model.js b/models/vendor.model.js index 701db11..8b0d1e4 100644 --- a/models/vendor.model.js +++ b/models/vendor.model.js @@ -55,6 +55,10 @@ const vendorSchema = new Schema( ], images: [String], tags: [String], + is_veg: { + type: Boolean, + default: false, + }, }, { timestamps: true } );