Closed bertrandshema closed 4 months ago
Attention: Patch coverage is 84.21053%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 86.26%. Comparing base (
189d16f
) to head (9ab0a9b
). Report is 1 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
src/controller/contactController.ts | 70.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Overview
This pull request implements the API endpoints to handle user contact submissions via a form. Instead of storing submissions in a database, the submissions are sent via email to administrators.
Tasks
Create Endpoint: Implemented POST /api/contact to handle the contact form submission and send an email to administrators.
Email Template and Nodemailer Integration: Created an email template and integrated it with Nodemailer to send emails.
Validation: Added validation to ensure all required fields (name, email, and message) are provided in the request body.
Testing: Created tests for the endpoint to ensure that emails are sent correctly and errors are handled appropriately.
API Documentation: Updated Swagger API documentation to include the new endpoint and its specifications.
Acceptance Criteria
How to Test
Screenshots