Home > Net >  Why I cant fetch item from mongodb when I add item with user.email?
Why I cant fetch item from mongodb when I add item with user.email?

Time:05-08

I add item in MongoDB with user email . Because when a user login I can show which item he/she select .

so it shows it individually . But when I try to fetch them with others items selected by other user. it didn't fetch .

CodePudding user response:

send your email address through query like const url = https://abc.xyz/"your server api route"?email=${email}; then get this email in server side by const email=req.query.email; finally send response from server as per system by finding data by this email. hopefully you will get your desired items by email.

  • Related