From 4411c9e2922252bd8d266714ad0bcfc21acc1d5c Mon Sep 17 00:00:00 2001 From: Greg V Date: Sat, 10 Aug 2024 22:01:59 -0700 Subject: [PATCH 1/2] bugfix: it's late and i'm tired --- api/messages/messages_service.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/api/messages/messages_service.py b/api/messages/messages_service.py index e58982d..759c8de 100644 --- a/api/messages/messages_service.py +++ b/api/messages/messages_service.py @@ -590,10 +590,10 @@ def save_npo_application(json): recaptcha_response_json = recaptcha_response.json() logger.info(f"Recaptcha Response: {recaptcha_response_json}") - if recaptcha_response_json["success"] == False: - return Message( - "Recaptcha failed" - ) + # if recaptcha_response_json["success"] == False: + # return Message( + # "Recaptcha failed" + # ) ''' @@ -627,7 +627,7 @@ def save_npo_application(json): logger.info(f"Sending welcome email to {name} {email}") - send_nonprofit_welcome_email(name, email) + send_nonprofit_welcome_email(organization, name, email) logger.info(f"Sending slack message to nonprofit-form-submissions") @@ -640,12 +640,10 @@ def save_npo_application(json): Idea: `{idea}` Is Nonprofit: `{isNonProfit}` ''' - send_slack(channel="nonprofit-form-submissions", message=slack_message, icon=":rocket:") + send_slack(channel="nonprofit-form-submissions", message=slack_message, icon_emoji=":rocket:") logger.info(f"Sent slack message to nonprofit-form-submissions") - - return Message( "Saved NPO Application" ) @@ -1035,7 +1033,7 @@ def send_nonprofit_welcome_email(organization_name, contact_name, email):
  • Upcoming Hackathons and Events
  • -

    Questions or need assistance? Reach out on our Slack channel or email us at support@ohack.dev.

    +

    Questions or need assistance? Reach out on our Slack channel or email us at support@ohack.org.

    We're excited to work with you to create tech solutions that amplify your impact!

    From c37cac0042c28cc0a7094e22bdc0af56afa34914 Mon Sep 17 00:00:00 2001 From: Greg V Date: Sat, 10 Aug 2024 22:02:33 -0700 Subject: [PATCH 2/2] need recaptcha on in prod, not in test --- api/messages/messages_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/messages/messages_service.py b/api/messages/messages_service.py index 759c8de..48c4c5d 100644 --- a/api/messages/messages_service.py +++ b/api/messages/messages_service.py @@ -590,10 +590,10 @@ def save_npo_application(json): recaptcha_response_json = recaptcha_response.json() logger.info(f"Recaptcha Response: {recaptcha_response_json}") - # if recaptcha_response_json["success"] == False: - # return Message( - # "Recaptcha failed" - # ) + if recaptcha_response_json["success"] == False: + return Message( + "Recaptcha failed" + ) '''