Implemented the routes for creating and deleting recipe posts.
When creating a recipe route, it references the user_id in the user collection.
When deleting a recipe route, it deletes the recipe from the user collection.
Modified helper function to include recipe verification. This ensures that the data being put into the database is correct. Creating a new recipe and updating the recipe utilize this verification.
Testing has been moved over to the Firebase Emulator.
Portions of this code that utilized AI generation
Asked for documentation and comments for creating and deleting recipes ChatGPT
Asked for documentation and comments for helper functions ChatGPT
Screenshots
When creating a new recipe in the Firestore Emulator
Deleting the created recipe (note the ID are the same from the screenshot above)
How to Test
Comment out @app.before_request in the server.py file. We do not need to run the middleware function while testing.
Run the Firebase Emulator.
Run the python server.py.
Using Postman, use the appropriate route to the Emulator.
Description / Changes Made
Portions of this code that utilized AI generation
Screenshots
When creating a new recipe in the Firestore Emulator![image](https://github.com/UNLV-CS472-672/2024-S-GROUP5-Munch/assets/143972302/b10cffe3-48c2-45ba-8698-0be6605e7a8b)
Deleting the created recipe (note the ID are the same from the screenshot above)![image](https://github.com/UNLV-CS472-672/2024-S-GROUP5-Munch/assets/143972302/80794652-231a-43b3-b6f4-a3c09495f776)
How to Test
@app.before_request
in the server.py file. We do not need to run the middleware function while testing.Checklist