Skip to content

Commit

Permalink
docs: Add developer comment about match statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 10, 2024
1 parent 22c99fe commit 9aca701
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ def send(

base_application_url = f"{app_settings.frontend_url}/application/{quote(application.uuid)}"

# This match statement must set `recipients`, `subject` and `parameters`.
#
# `recipients` is a list of lists. Each sublist is a `ToAddresses` parameter for an email message.
#
# All URLs using `app_settings.frontend_url` are React routes in credere-frontend.
match message_type:
case MessageType.BORROWER_INVITATION | MessageType.BORROWER_PENDING_APPLICATION_REMINDER:
base_fathom_url = "?utm_source=credere-intro&utm_medium=email&utm_campaign="

recipients = [[application.primary_email]]
subject = _("Opportunity to access MSME credit for being awarded a public contract")

base_fathom_url = "?utm_source=credere-intro&utm_medium=email&utm_campaign="
parameters = {
"AWARD_SUPPLIER_NAME": application.borrower.legal_name,
"TENDER_TITLE": application.award.title,
Expand Down

0 comments on commit 9aca701

Please sign in to comment.