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: unsubscribe to the newsletter by email #447

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Heba-WebDev
Copy link
Contributor

Description

Closes #404

Changes proposed

  • Added PATCH /api/v1/news-letter/unsubscribe Endpoint:
  • Implemented a new endpoint to unsubscribe a newsletter subscriber by their email address.
  • This endpoint uses a PATCH request and marks the subscriber as deleted by setting IsDeleted
  • Created Commands and Handlers:
  • Added DeleteSubscriberByEmailCommand and DeleteSubscriberByEmailCommandHandler for the PATCH endpoint.
  • Wrote unit tests for DeleteSubscriberByEmailCommandHandler in the Hng.Application.Test project.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

Screenshots/Videos

  • Subscriber successfully deleted
    Screenshot 2025-03-02 at 9 21 47 PM
  • Subscriber already deleted
    Screenshot 2025-03-02 at 9 21 52 PM
  • Subscriber not found
    Screenshot 2025-03-02 at 9 22 00 PM
  • Invalid email format
    Screenshot 2025-03-02 at 9 22 13 PM

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.

[FEAT] Implement Unsubscribe Endpoint for Newsletter
1 participant