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

GET and PATCH Recipe routes #80

Closed Fabrizv closed 6 months ago

Fabrizv commented 6 months ago

Description / Changes Made

Portions of this code that utilized AI generation

Screenshots (optional)

Getting a recipe image

Updating a recipe image

How to Test

  1. Comment out @app.before_request in the server.py file. We do not need to run the middleware function while testing.
  2. Run the Firebase Emulator.
  3. Run the python server.py.
  4. Using Postman, use the appropriate route to the Emulator.
  5. When getting a recipe post: Set method to GET, set route and add the recipe id you want to get like http://127.0.0.1:5000/api/recipes/{instert_recipe_id_here}.
  6. Check with the Firestore Emulator that the post has been created.
  7. When updating a recipe post: Set method to PATCH, and set route to an existing recipe http://127.0.0.1:5000/api/recipes/{instert_recipe_id_here}, and add the newly updated JSON body to input.
  8. Check with the Firestore Emulator that the post has been updated from the database.
  9. The route from the screenshots above is http://127.0.0.1:5000/api/recipes/8JgOnxlpHszEL5XpkUTZ

Checklist