From 7293ecb185335e1c43aaf544f483bb974bf15982 Mon Sep 17 00:00:00 2001
From: TheJoeCoder <joe@radialbog9.uk>
Date: Thu, 29 Jun 2023 12:24:33 +0100
Subject: [PATCH] [Frontend] New session logic partially done

---
 client/pizza_palace.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/client/pizza_palace.py b/client/pizza_palace.py
index f3ad1f2..0d69eb4 100644
--- a/client/pizza_palace.py
+++ b/client/pizza_palace.py
@@ -84,8 +84,12 @@ def connect(*args):
 
 # Create new session
 def new_session(*arg):
-    
-    pass
+    res = requests.post(get_endpoint("/cart/new"))
+    if (res.status_code == 200):
+        # TODO parse response
+        pass
+    else:
+        connect_fail()
 
 # Refresh order screen items
 def refresh_items(*args):
-- 
GitLab