XThomasBU commited on
Commit
43041d8
·
1 Parent(s): 0dc6d3f

format changes

Browse files
Files changed (1) hide show
  1. code/app.py +2 -4
code/app.py CHANGED
@@ -80,7 +80,7 @@ flow = Flow.from_client_config(
80
 
81
 
82
  def get_user_role(username: str):
83
- return USER_ROLES.get(username, ["student"]) # Default to "student" role
84
 
85
 
86
  async def get_user_info_from_cookie(request: Request):
@@ -246,9 +246,7 @@ async def post_signin(request: Request):
246
  TOKENS_LEFT # set the number of tokens left for the new user
247
  )
248
  if "all_time_tokens_allocated" not in user_details.metadata:
249
- user_details.metadata["all_time_tokens_allocated"] = (
250
- ALL_TIME_TOKENS_ALLOCATED
251
- )
252
  if "in_cooldown" not in user_details.metadata:
253
  user_details.metadata["in_cooldown"] = False
254
  await update_user_info(user_details)
 
80
 
81
 
82
  def get_user_role(username: str):
83
+ return USER_ROLES.get(username, ["guest"]) # Default to "guest" role
84
 
85
 
86
  async def get_user_info_from_cookie(request: Request):
 
246
  TOKENS_LEFT # set the number of tokens left for the new user
247
  )
248
  if "all_time_tokens_allocated" not in user_details.metadata:
249
+ user_details.metadata["all_time_tokens_allocated"] = ALL_TIME_TOKENS_ALLOCATED
 
 
250
  if "in_cooldown" not in user_details.metadata:
251
  user_details.metadata["in_cooldown"] = False
252
  await update_user_info(user_details)