Skip to content

Commit

Permalink
[fixes🛠️] typed annotated verify captcha function and simplified resp…
Browse files Browse the repository at this point in the history
…onse variable.
  • Loading branch information
[esekyi] committed Oct 27, 2024
1 parent 6997ae9 commit bc7495f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/recaptcha_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from flask import current_app


def verify_recaptcha(recaptcha_response):
def verify_recaptcha(recaptcha_response: str) -> bool:
"""Verifies the Google reCAPTCHA response.
Args:
Expand All @@ -22,7 +22,7 @@ def verify_recaptcha(recaptcha_response):
'response': recaptcha_response
}
response = requests.post(
'https://www.google.com/recaptcha/api/siteverify', data=data)
current_app.config['RECAPTCHA_VERIFY_URL'], data=data)

if response.status_code == 200:
result = response.json()
Expand Down

0 comments on commit bc7495f

Please sign in to comment.