Skip to content

Instantly share code, notes, and snippets.

@mercykip
Created July 19, 2022 15:59
Show Gist options
  • Select an option

  • Save mercykip/fed2dfe5af1bc307d982b6193229b3a4 to your computer and use it in GitHub Desktop.

Select an option

Save mercykip/fed2dfe5af1bc307d982b6193229b3a4 to your computer and use it in GitHub Desktop.
@Override
public Users addUsers(Users user) {
Boolean existsEmail = usersRepository.selectExistsEmail(user.getEmail());
if (existsEmail) {
throw new BadRequestException(
"Email " + user.getEmail() + " taken");
}
return usersRepository.save(user);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment