Skip to content

Commit

Permalink
fix: fix mentorship followup emails
Browse files Browse the repository at this point in the history
  • Loading branch information
helloanil committed Jun 20, 2024
1 parent 7d52cae commit 162f358
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,23 @@ export class ReminderEmailsController {
await this.reminderEmailsService.getThreeMonthsOldMentorshipMatches()

if (Object.keys(threeMonthsOldMentorshipMatches).length > 0) {
threeMonthsOldMentorshipMatches.forEach(async (match) => {
Object.keys(threeMonthsOldMentorshipMatches).forEach(async (match) => {
// Send reminder email to mentee
await this.reminderEmailsService.sendMentorshipFollowUpReminder({
userType: UserType.MENTEE,
email: match.menteeEmail,
firstName: match.menteeFirstName,
menteeOrMentorFirstName: match.mentorFirstName,
email: threeMonthsOldMentorshipMatches[match].menteeEmail,
firstName: threeMonthsOldMentorshipMatches[match].menteeFirstName,
menteeOrMentorFirstName:
threeMonthsOldMentorshipMatches[match].mentorFirstName,
})

// Send reminder email to mentor
await this.reminderEmailsService.sendMentorshipFollowUpReminder({
userType: UserType.MENTOR,
email: match.mentorEmail,
firstName: match.mentorFirstName,
menteeOrMentorFirstName: match.menteeFirstName,
email: threeMonthsOldMentorshipMatches[match].mentorEmail,
firstName: threeMonthsOldMentorshipMatches[match].mentorFirstName,
menteeOrMentorFirstName:
threeMonthsOldMentorshipMatches[match].menteeFirstName,
})
})
}
Expand Down

0 comments on commit 162f358

Please sign in to comment.