Skip to content

Commit

Permalink
fix: getVendors
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya062003 committed Apr 9, 2024
1 parent e0b4fb9 commit d0e70ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/customerController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] };
Expand Down
4 changes: 4 additions & 0 deletions models/vendor.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const vendorSchema = new Schema(
],
images: [String],
tags: [String],
is_veg: {
type: Boolean,
default: false,
},
},
{ timestamps: true }
);
Expand Down

0 comments on commit d0e70ee

Please sign in to comment.