Skip to content

FEAT:newsletter unsubscribe endpoint#699

Open
odero-lavenda wants to merge 1 commit intohngprojects:devfrom
odero-lavenda:gaga
Open

FEAT:newsletter unsubscribe endpoint#699
odero-lavenda wants to merge 1 commit intohngprojects:devfrom
odero-lavenda:gaga

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