Skip to content

Instantly share code, notes, and snippets.

Created May 6, 2019
What would you like to do?
router.get('/brand/:smabrand', function(req, res) {
const smaquery = req.query;
// [..]
let getProductCount=async function(smaquery){
let count= await Products.countDocuments(smaquery);
if (count === 0) {
return res.send("Brand not found!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment