Open shubhsheth opened 2 years ago
I have created a backend for this newsletter similar to email.js.
I am pushing my codes to the newsletterendpoint
branch. Please check it and let me know.
I want to create a pull request for approval so that I can submit the summary of this issue to my professor by the end of the work.
@mayankdp The newsletter follows the same format as email endpoint but instead of sending email it stores the email in the mailing list. (https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact)
I looked at your code, I think it's not ready to merge into master branch for the above reasons. You can create a pull request to merge it in a feature branch 'feature/newsletter' and then continue working on it after submitting the summary.
Add an endpoint in the API that take in a POST request with following fields:
Validate this input using express-validator
Send this information to sendgrid mailing list using Sendgrid API, link to sendgrid documentation (https://docs.sendgrid.com/api-reference/contacts-api-lists/add-a-single-recipient-to-a-list)
Notes: