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(newsletters): add subscribe endpoint #353

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

Solomonuche
Copy link
Contributor

@Solomonuche Solomonuche commented Jul 24, 2024

This PR contains the implementation of [POST] /api/v1/newsletters [UNPROTECTED Endpoint]

Description

Develop a backend endpoint to handle requests for newsletter subscriptions. The endpoint will accept an email address, validate and sanitize it, and then handle both successful and failed validations appropriately. If the email passes validation, it will be stored in the database and a 'success' response will be sent to the client. If validation fails, an error message will be returned.

Related Issue (Link to issue ticket)

This is an implementation of an open issue Link

How Has This Been Tested?

This implementation has been thoroughly tested with fastapi openapi interface and postman

Screenshots (if appropriate - Postman, etc):​

Successful response

Error response

Checklist:

  • [x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • [x ] I have added tests to cover my changes.
  • [x ] All new and existing tests passed.

@SundayMba SundayMba self-requested a review July 24, 2024 16:46
joboy-dev
joboy-dev previously approved these changes Jul 24, 2024
@joboy-dev
Copy link
Contributor

@bolexs this is okay

SundayMba
SundayMba previously approved these changes Jul 24, 2024
@SundayMba
Copy link
Contributor

@bolexs okay

@Solomonuche Solomonuche dismissed stale reviews from SundayMba and joboy-dev via a7cc4b0 July 24, 2024 17:59
@Solomonuche Solomonuche changed the title feat: newsletter Api implementation feat(newsletters): add create endpoint Jul 24, 2024
@zxenonx zxenonx changed the title feat(newsletters): add create endpoint feat(newsletters): add subscribe endpoint Jul 24, 2024
Copy link
Contributor

@zxenonx zxenonx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Solomonuche. Good.

@zxenonx zxenonx merged commit 74ae171 into hngprojects:dev Jul 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants