From bc7495fd188fff6e9578be017bd2267c02b7b428 Mon Sep 17 00:00:00 2001 From: "[esekyi]" <[sskert10@gmail.com]> Date: Sun, 27 Oct 2024 13:08:25 +0000 Subject: [PATCH] =?UTF-8?q?[fixes=F0=9F=9B=A0=EF=B8=8F]=20typed=20annotate?= =?UTF-8?q?d=20verify=20captcha=20function=20and=20simplified=20response?= =?UTF-8?q?=20variable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/recaptcha_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/recaptcha_service.py b/app/services/recaptcha_service.py index b684a0f..972feca 100644 --- a/app/services/recaptcha_service.py +++ b/app/services/recaptcha_service.py @@ -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: @@ -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()