Gregniuki commited on
Commit
3d61992
1 Parent(s): b55b2df

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -149,7 +149,7 @@ async def register_post(
149
  email: str = Form(...),
150
  password: str = Form(...),
151
  confirm_password: str = Form(...),
152
- recaptcha_token: str = Form(...), # Add this line to accept the reCAPTCHA token
153
  db: Session = Depends(get_db)
154
  ):
155
  # Perform reCAPTCHA verification first
@@ -158,10 +158,10 @@ async def register_post(
158
  recaptcha_action = 'submit' # The action you're expecting
159
 
160
  # Call the create_assessment function to validate the token
161
- # assessment = await create_assessment( project_id, recaptcha_key, recaptcha_token, recaptcha_action )
162
  loop = asyncio.get_running_loop()
163
  assessment = await loop.run_in_executor(
164
- None, create_assessment, project_id, recaptcha_key, recaptcha_token, recaptcha_action
165
  )
166
 
167
  # Check the assessment result
 
149
  email: str = Form(...),
150
  password: str = Form(...),
151
  confirm_password: str = Form(...),
152
+ token: str = Form(...), # Add this line to accept the reCAPTCHA token
153
  db: Session = Depends(get_db)
154
  ):
155
  # Perform reCAPTCHA verification first
 
158
  recaptcha_action = 'submit' # The action you're expecting
159
 
160
  # Call the create_assessment function to validate the token
161
+ # assessment = await create_assessment( project_id, recaptcha_key, token, recaptcha_action )
162
  loop = asyncio.get_running_loop()
163
  assessment = await loop.run_in_executor(
164
+ None, create_assessment, project_id, recaptcha_key, token, recaptcha_action
165
  )
166
 
167
  # Check the assessment result