From 0ac8e05caf58b71ec97d4afa9b2c2e9e0ebf7533 Mon Sep 17 00:00:00 2001 From: TheJoeCoder <joe@radialbog9.uk> Date: Tue, 18 Jul 2023 11:32:06 +0100 Subject: [PATCH] [Frontend] Fix cart add endpoint --- client/pizza_palace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/pizza_palace.py b/client/pizza_palace.py index c593f95..7f97ab9 100644 --- a/client/pizza_palace.py +++ b/client/pizza_palace.py @@ -144,7 +144,8 @@ def order_item(item, people, stuffed_crust): if item_dict == {}: messagebox.showerror("Error", "Could not find pizza") 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): res_json = res.json() if (res_json != None and res_json["status"] == 200): -- GitLab