Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Contact Us endpoints Api #162

Closed
5 tasks
bertrandshema opened this issue Jul 21, 2024 · 0 comments · Fixed by #163
Closed
5 tasks

Feat: Contact Us endpoints Api #162

bertrandshema opened this issue Jul 21, 2024 · 0 comments · Fixed by #163
Assignees
Labels
backend Good for newcomers

Comments

@bertrandshema
Copy link
Contributor

bertrandshema commented Jul 21, 2024

Overview:

We need to implement API endpoints to handle user contact submissions via a form. Instead of storing submissions in a database, the submissions will be sent via email to administrators.

Tasks:

  • Create endpoint - POST /api/contact to handle the contact form submission and send an email to administrators.
  • Create an email template and connect it to nodemailer for email sending
  • Implement validation for all required fields (name, email, and message) are provided in the request body.
  • Create tests for the endpoint to ensure that emails are sent correctly and errors are handled.
  • Update Swagger API documentation to include the new endpoint and its specifications.

Acceptance Criteria:

  1. The /API/contact POST endpoint must successfully send an email and return the correct status and response based on the request.
  2. The endpoint must validate input fields and return appropriate error messages for missing fields.
  3. Ensure all tests for the endpoint pass, covering both successful and error scenarios.
  4. Update the API documentation to include the new endpoint and its details.

Additional Notes:

  • Consider implementing rate limiting and spam protection for the contact form endpoint.
  • Ensure that sensitive information is handled securely and complies with privacy regulations.
@bertrandshema bertrandshema added the backend Good for newcomers label Jul 21, 2024
@bertrandshema bertrandshema self-assigned this Jul 21, 2024
@bertrandshema bertrandshema linked a pull request Jul 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant