Skip to content

Instantly share code, notes, and snippets.

@sm-a
Created May 6, 2019
Embed
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);
console.log(count)
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