Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: add product functionality is not working #1

Open
sujeetgund opened this issue Apr 29, 2024 · 1 comment
Open

[BUG]: add product functionality is not working #1

sujeetgund opened this issue Apr 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sujeetgund
Copy link

What does this issue address?

This issue is to address the bug in add product functionality.

How to produce this bug?

  1. Install the project
  2. Start project with npm run start
  3. Go to http://localhost:3000
  4. Click on "Add Product" button
  5. Add product

Supporting Evidence

image
image

@itzabhinavarya
Copy link
Owner

itzabhinavarya commented Jul 22, 2024

@sujeetgund You are right; it is happening because when the mongo is connecting it immediately create a new user , attached reference ;
image
image

here i have used a middleware to check if the new user is created or not and statically passed the id to check the user
image

so in your case the user is created but the id is not matching , if you open you mongodb collection and navigation to user document you will find the id copy that and paste in the code . it works fine.

I know this is not good approach, but i was working in this way through out the development . i request you to fix the issue by creating two new route, login and signup , let me know if any help required by my side.

firstly user signup so there id will be created then login to access the dashboard.
if logged in then everything works fine .

Assigning this issue to you.

All the best . @sujeetgund

@itzabhinavarya itzabhinavarya added bug Something isn't working good first issue Good for newcomers labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants