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:newsletter unsubscribe endpoint #699

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

odero-lavenda
Copy link

Changes proposed

  • Added a base response and request DTO
  • Added DELETE /api/v1/newsletter-subscription/userId endpoint to Newsletter controller.
  • Added unit tests .

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.

assertThrows(NotFoundException.class, () -> newsletterService.unsubscribeFromNews(subscriberId));
verify(newsletterRepository, never()).delete(any());
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this commented out section

@odero-lavenda
Copy link
Author

  • successful response returns a 200 status code.
    image (2)

*Not found subscriber returns 400 status code
image

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.

2 participants