Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian committed Jun 23, 2023
1 parent cdbd7f9 commit a451e42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/routers/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async def update_apps_send_notifications(
application = utils.get_application_by_uuid(payload.uuid, session)
application.status = core.ApplicationStatus.SUBMITTED
application.lender_id = payload.lender_id
client.send_notifications_of_new_applications("aomm24@gmail.com")
client.send_notifications_of_new_applications("adrian.martinez@willdom.com")
return "recibido"
except ClientError as e:
logging.error(e)
Expand Down
10 changes: 4 additions & 6 deletions app/utils/email_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,20 @@ def send_invitation_email(ses, uuid, email, borrower_name, buyer_name, tender_ti
return response.get("MessageId")


def send_notification_new_app_to_fi(ses, name, username):
def send_notification_new_app_to_fi(ses, username):
# todo refactor required when this function receives the user language

images_base_url = get_images_base_url()

data = {
**generate_common_data(name),
"USER": name,
**generate_common_data(),
"LOGIN_URL": app_settings.frontend_url,
"LOGIN_IMAGE_LINK": images_base_url + "logincompleteimage.png",
"LOGIN_IMAGE_LINK": images_base_url + "/logincompleteimage.png",
}

ses.send_templated_email(
Source=app_settings.email_sender_address,
# Destination={"ToAddresses": [username]},
Destination={"ToAddresses": "aomm24@gmail.com"},
Destination={"ToAddresses": [username]},
Template=email_templates.NEW_APPLICATION_SUBMISSION_FI_TEMPLATE_NAME,
TemplateData=json.dumps(data),
)

0 comments on commit a451e42

Please sign in to comment.