Open helloanil opened 1 week ago
The recent updates introduce clearer messaging and refined logic to the ReminderEmailsController in the NestJS API. New functionalities for handling reminders about unmatched mentees and pending mentorships have been added, while existing methods and logic in related services have been updated for consistency and precision.
File Path | Change Summary |
---|---|
apps/nestjs-api/src/reminder-emails/reminder-emails.controller.ts | Updated messages for clarity. Modified sendUnmatchedMenteesReminder to handle unmatched mentees for 45 days. Added sendPendingMentorshipsReminder method. |
apps/nestjs-api/src/reminder-emails/reminder-emails.service.ts | Introduced new functions getUnmatchedMenteesFor45Days and getPendingMenteeApplications . Added constants for sender info. Adjusted email sending logic. |
apps/nestjs-api/src/con-mentorship-matches/con-mentorship-matches.service.ts | Renamed variables and method calls for consistency (e.g., menteePendingMentorshipMatches to menteependingMenteeApplications ). |
sequenceDiagram
participant User
participant ReminderEmailsController
participant ReminderEmailsService
participant ConMentorshipMatchesService
participant EmailService
User ->> ReminderEmailsController: sendUnmatchedMenteesReminder()
ReminderEmailsController ->> ReminderEmailsService: getUnmatchedMenteesFor45Days()
ReminderEmailsService ->> ConMentorshipMatchesService: retrieveUnmatchedMenteesData()
ConMentorshipMatchesService -->> ReminderEmailsService: unmatchedMenteesData
ReminderEmailsService ->> EmailService: sendReminderEmails(unmatchedMenteesData)
EmailService -->> ReminderEmailsService: status
ReminderEmailsService -->> ReminderEmailsController: unmatchedMenteesData.length
ReminderEmailsController -->> User: Platform Update Reminder Emails Sent to Mentees: ${unmatchedMenteesData.length}
User ->> ReminderEmailsController: sendPendingMentorshipsReminder()
ReminderEmailsController ->> ReminderEmailsService: getPendingMenteeApplications()
ReminderEmailsService ->> ConMentorshipMatchesService: retrievePendingMenteeApplicationsData()
ConMentorshipMatchesService -->> ReminderEmailsService: pendingMenteeApplicationsData
ReminderEmailsService ->> EmailService: sendReminderEmails(pendingMenteeApplicationsData)
EmailService -->> ReminderEmailsService: status
ReminderEmailsService -->> ReminderEmailsController: pendingMenteeApplicationsData.length
ReminderEmailsController -->> User: Pending Mentorship Reminder emails sent to Mentors: ${pendingMenteeApplicationsData.length}
From service lines and data streams,
To unmatched dreams and mentor beams,
New reminders now take flight,
Bringing clarity to the night.
Emails sent with joy and cheer,
Until our next update is near.
🐇✨📧
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hi @helloanil , thank you! Do you know why the text on the first one is purple?
Hi @helloanil , thank you!
Do you know why the text on the first one is purple?
Hi @astkhikatredi, it's because of Gmail. When the same email is received many times, Gmail stacks them and show some of them in purple. It won't happen to users.
What Github issue does this PR relate to? Insert link.
712
What should the reviewer know?
Adding a new endpoint
sendUnmatchedMenteesReminder
to theReminderEmailsController
inreminder-emails.controller.ts
. It retrieves a list of unmatched mentees for 45 days and sends reminder emails to each mentee. The email includes the mentee's email and first name.Also includeing a return message indicating the number of reminder emails sent.
And adding a new endpoint in the
ReminderEmailsController
to send reminder emails to mentors with pending mentorship applications. ThesendPendingMentorshipsReminder
function retrieves the pending mentorship matches and sends reminder emails to the corresponding mentors. The number of reminder emails sent is included in the response message.Screenshots
Summary by CodeRabbit
New Features
Updates
Bug Fixes