Hi not sure this is the right place to ask for help but, I have a search bar and I’m having a user search for the item they want and then they’ll get the result but I’m having trouble on how to do itMy product controller exports.search =async(req,res,next)=>{ const {results}= req.query //this is when I have the issue not sure whether to get back all the data then filter and compare with the query, also to note I’m comparing the results (req.query.results)with Product.title(as in the name of the product the user is searching) any help is much appreciated, thanks!!
Submitted October 09, 2019 at 02:41PM by LoneBarcaWolfgirl
No comments:
Post a Comment