added product lookup endpoint
This commit is contained in:
@@ -14,7 +14,7 @@ def get_products():
|
|||||||
return products
|
return products
|
||||||
|
|
||||||
@app.get("/products/{productid}")
|
@app.get("/products/{productid}")
|
||||||
def get_product(productid:str):
|
def get_product(productid: str):
|
||||||
with open("products.json", "r") as file:
|
with open("products.json", "r") as file:
|
||||||
products = json.load(file)
|
products = json.load(file)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user