-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sign in connection #10 Tony/Spencer #20
Conversation
- Added POST /api/users endpoint for user creation - Implemented duplicate email/username checking - Connected signup form to backend API - Added MongoDB user schema and validation - Added error handling for user creation
Hi @tony1759 and @Sanderson28801, really nice job on completing the ticket! One change I would suggest is instead of hardcoding the backend URL to fetch from, could you instead set it so that the port is retrieved from a .env file instead? That way if people have different ports set up we don't get an error from accessing the server using the wrong URL. Let me know if you have any questions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After checking into your branch and testing if I can create a user, I'm getting an "An error occurred while creating the user." I tested using Postman and was able to succesfully create a user, but the user was created in the wrong database.
Postman:
MongoDB:
Could you test the code with our database? I made a database for our project that everyone should be invited to, let me know if you don't see the invite!
Another thing is the sign up form doesn't seem to be setting the username field in formData (when submitting the form the username is blank in the alert). This actually isn't a problem with your code, it's a problem in main too, but if you could get that working that would be great (the issue is that the name attribute in the username input does not match the formData field)
- Added separate firstName and lastName fields to signup form - Updated User schema to properly handle first/last names - Fixed database connection to use shared database - Updated environment variables for proper API URL - Removed unused environment variables
Describe your changes
Added user signup functionality with MongoDB integration:
Issue ticket number and link
#10
Does your code meet the acceptance criteria?
Testing Done
Created new user successfully:
Tested duplicate prevention:
Tested form validation:
Other comments