Skip to content
Snippets Groups Projects
Verified Commit 0ac8e05c authored by TheJoeCoder's avatar TheJoeCoder
Browse files

[Frontend] Fix cart add endpoint

parent 9f1304ab
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,8 @@ def order_item(item, people, stuffed_crust): ...@@ -144,7 +144,8 @@ def order_item(item, people, stuffed_crust):
if item_dict == {}: if item_dict == {}:
messagebox.showerror("Error", "Could not find pizza") messagebox.showerror("Error", "Could not find pizza")
return return
res = requests.post(get_endpoint("/cart/add"), json={"cart_id": cart_id, "cart_key": cart_key, "pizza_id": item, "people": people, "stuffed_crust": stuffed_crust}) res = requests.post(get_endpoint("/cart/add"), json={"id": cart_id, "key": cart_key, "type": item, "num_people": people, "stuffed_crust": stuffed_crust})
print(res.text)
if (res.status_code == 200): if (res.status_code == 200):
res_json = res.json() res_json = res.json()
if (res_json != None and res_json["status"] == 200): if (res_json != None and res_json["status"] == 200):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment