Closed KhangMBui closed 3 weeks 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
Hey, @mrthomaslibrary are you working on this task now?
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