Remove extraneous if/else for captcha verification
This commit is contained in:
parent
e13a789f15
commit
d8e9aa0c46
1 changed files with 46 additions and 48 deletions
|
@ -76,6 +76,4 @@ def validate_captcha(form):
|
|||
captcha_response = form["captcha_response"]
|
||||
data = {"secret": "6Lc4xhMTAAAAACFaG2NyuKoMdZQtSa_1LI76BCEu", "response": captcha_response}
|
||||
response = requests.post("https://www.google.com/recaptcha/api/siteverify", data=data)
|
||||
if response.json()["success"]:
|
||||
return True
|
||||
return False
|
||||
return response.json()["success"]
|
||||
|
|
Loading…
Reference in a new issue