Remove extraneous if/else for captcha verification

This commit is contained in:
James Wang 2015-12-26 20:24:57 -05:00
parent e13a789f15
commit d8e9aa0c46

View file

@ -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"]