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

[Server] Code fix and bugfixes

parent fb71d3b5
Branches
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ def get_cart_items():
# Get cart and verify not none
cart = get_cart(cart_id, cart_key)
if (cart == None):
return "{\"status\":403, \"message\": \"invalid cart credentials\"}", 403
return gen_invalid_creds_msg()
return "{\"status\":200, \"items\": " + json.dumps(cart["items"]) + "}", 200
@app.route("/cart/add", methods=["POST"])
......@@ -226,7 +226,7 @@ def confirm_order_cart():
# Remove cart from existing carts
del open_carts[cart_id]
# Return order ID
return "{\"status\":200,\"message\":\"OK\", \"code\":\"" + str(order_id) + "\"}", 200
return "{\"status\":200,\"message\":\"ok\", \"code\":\"" + str(order_id) + "\"}", 200
# Main program code
if (__name__ == "__main__"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment