Update main.py
Browse files
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 |
-
|
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,
|
162 |
loop = asyncio.get_running_loop()
|
163 |
assessment = await loop.run_in_executor(
|
164 |
-
None, create_assessment, project_id, recaptcha_key,
|
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
|