Skip to content

feat: add certificate preview endpoint and sendEmail option#71

Merged
theanmolsharma merged 1 commit intomainfrom
feat/certificate-preview-and-send-email-option
Mar 28, 2026
Merged

feat: add certificate preview endpoint and sendEmail option#71
theanmolsharma merged 1 commit intomainfrom
feat/certificate-preview-and-send-email-option

Conversation

@theanmolsharma
Copy link
Copy Markdown
Collaborator

Summary

  • Add GET cohort/:cohortId/preview endpoint that lets TAs preview which certificates would be generated (name, type, rank, exercises) without persisting anything
  • Update POST cohort/:cohortId/generate to require a sendEmail boolean in the request body — emails are only dispatched when sendEmail: true
  • Extract shared eligibility logic into a private buildCertificateEntities method used by both preview and generate
  • GetCertificateResponseDto now extends CertificatePreviewResponseDto to reduce duplication

🤖 Generated with Claude Code

…tion

Add a preview endpoint so TAs can review which certificates would be
generated before committing. Update the generate endpoint to require a
sendEmail flag, only dispatching certificate emails when explicitly
requested.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theanmolsharma theanmolsharma merged commit 239f1fe into main Mar 28, 2026
2 checks passed
@theanmolsharma theanmolsharma deleted the feat/certificate-preview-and-send-email-option branch March 28, 2026 05:13
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.

2 participants