Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Philnue committed Oct 29, 2023
1 parent db892d2 commit 3a0bfed
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions backend/main.py
Expand Up @@ -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]

Expand Down

0 comments on commit 3a0bfed

Please sign in to comment.