WSU-Software-Development-Club / best-by-notification

This is the WSU Software Development Club's repository for the best-by-notification app.
MIT License
5 stars 4 forks source link

Make a route to GET/FETCH a product BY NAME #11

Closed KhangMBui closed 3 weeks ago

KhangMBui commented 1 month ago

In the folder 'routes' of the backend directory (flask-server), implement a function that makes a route to get a product with a specific name.

Some documents to look for reference:

https://www.geeksforgeeks.org/flask-app-routing/ https://www.geeksforgeeks.org/flask-http-method/

Hints:

Step-by-step instructions in case you need it:

In the function:

Step 1: Define the Route (Already shown above)

Step 2: Retrieve the Product from the Database

Step 3: Check if the Product Exists

Step 4: Return the Product Data as JSON

Step 5: Handle the Case When the Product is Not Found

mingo0805 commented 4 weeks ago

Hey, @mrthomaslibrary are you working on this task now?