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

Login check #24

Merged
merged 8 commits into from
Nov 2, 2024
Merged

Login check #24

merged 8 commits into from
Nov 2, 2024

Conversation

jpuka01
Copy link
Collaborator

@jpuka01 jpuka01 commented Nov 1, 2024

Describe your changes

We implemented a check that validates if a user exists in our MongoDB database by checking the username and password. If the user credentials during logging in exists, the API sends out a successful login message. Otherwise, the API will catch whether the name or password of the user is invalid and appropriately send out an error message based on the catch. We also ensured a check whether our endpoint faced any database server related issues as well as commented debug prints for added debugging.

Issue ticket number and link

#12

Does your code meet the acceptance criteria?

  • Yes

Testing done and screenshots (if relevant)

  1. Checked if both username and password matches any single user in the database and returned a successful login.
  2. Checked if any of the username or password field does not match any existing user in the database, then return a specific error message.
  3. Ensured our endpoint is connected to our database server.

Other comments

N/A

Copy link
Collaborator

@myix765 myix765 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job implementing the login check! Everything looks great, just a heads up that all of our endpoint routes are going to be prefixed with /api/. This is to keep the API routes separate from our frontend website routes which isn't a problem right now because we're using different ports for frontend and backend, but will be a problem when we deploy.

@myix765 myix765 merged commit 538fc05 into main Nov 2, 2024
1 check passed
@myix765 myix765 deleted the login-check branch November 18, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants