From 3a0bfedbf265a2731364d2bc478648ea123c0d3f Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 29 Oct 2023 15:42:00 +0100 Subject: [PATCH] Fixed --- backend/main.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/main.py b/backend/main.py index 1fd96a9..74af621 100644 --- a/backend/main.py +++ b/backend/main.py @@ -29,20 +29,30 @@ def load_current_user(userId): @app.get("/button_trigger/{userId}/{time_slot}") def load_current_user(userId: str, time_slot: int): + + userData = getUserWithId(userId) + + companyId = userData.data["company"]["id"] age_rangeId = userData.data["age_range"]["id"] time_rangeId = time_slot today = datetime.today().date() + today = "10.29.2023" + #python try catch data = "" + try: + + data = supabase_client.table("query_waiting").insert([{"user": userId, "date": today, "company" :companyId , "age_range":age_rangeId, "time_range":time_rangeId, }]).execute() except(Exception): - print("error") - + print("Error first") + + queryList = getAllQueryListData()[1]