UNLV-CS472-672 / 2024-S-GROUP5-Munch

The Munch app is a social platform where users create profiles by selecting preferred foods.
1 stars 11 forks source link

Closes #35: Modify/Fix Users Routes And Update User Collection Accordingly #41

Closed Dhooly closed 5 months ago

Dhooly commented 5 months ago

This is related to issue #35

Description / Changes Made

Routes fixed:

  1. get_user
  2. create_user
  3. update_user
  4. delete_user

Screenshots

image

image

How to Test

  1. Install Postman
  2. Create a collection called 'Munch'
  3. Create a new request
  4. Select the HTTP method for the route you want to test (GET, POST, DELETE, etc)
  5. Add the proper route
  6. Add required data if necessary (JSON data, Content-Type, etc)
  7. Send the request
  8. Check if expected response is received
  9. Check if changes are reflected in the database
  10. Repeat steps 3-11 for any other requests

Checklist

noodaj commented 5 months ago

@rparker2003 I'm not sure if you guys want to refactor this now, but I see that the try_connect_to_db is called for every function. Can we not have this outside of the at the very top of the file and just return an error if we are not able to connect to the database.

rparker2003 commented 5 months ago

It seems another issue that on a put request the data isn't actually even when the data is verified as a reference. Possible relates to the issue listed above.

rparker2003 commented 5 months ago

I have looked through your revisions and I like the changes. Everything functions as required!