Skip to content

Conversation

@nourshoreibah
Copy link

@nourshoreibah nourshoreibah commented Feb 6, 2025

ℹ️ Issue
Closes https://www.notion.so/mahekagg/GI-72-Lambda-function-to-send-emails-using-SES-for-when-an-application-has-been-received-18a8b3e6836e80738281ca9f6e457d72?pvs=4

📝 Description

  • Created a lambda function called giSendApplicationConfirmation
  • Installed the lambda sdk
  • Created a lambda nest.js service similar to the dynamoDB one and registered it
  • Invoked the lambda function from the post applications endpoint

Notes:

  • The current DTO for posting an application does not contain the site name, user first name, or user email. This means we need to query the user and sites table when posting a new application so we can send the email. We could fix this by adding more fields for the DTO and save some compute. For now, I just used the get user and get site endpoint to pull this information before sending the email.
  • I hard coded the placeholder "30 days" (in the API not the lambda function) for application time frame

Verification
Added mock user to users table and posted a new application with swagger, confirmed that I got an email.

Screenshot 2025-02-06 at 12 02 35 PM Screenshot 2025-02-06 at 12 03 20 PM Screenshot 2025-02-06 at 12 04 04 PM Screenshot 2025-02-06 at 12 11 49 PM

@nourshoreibah
Copy link
Author

Also sorry there are random commits from my last ticket, i accidentally branched off from it. I merged main in though i think they'll go away once my last PR merges

Copy link

@hams7504 hams7504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and it looks good to me!
Should be good to merge once you remove the SignUpPage.tsx file additions! (might have to merge with main)

@nourshoreibah nourshoreibah merged commit 8400bd4 into main Feb 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants