Update UserAccountService.java

Reverting changes
This commit is contained in:
raviavhad
2021-07-24 14:15:50 +05:30
committed by GitHub
parent 9018538097
commit e82a09acef

View File

@@ -30,9 +30,12 @@ public class UserAccountService {
for (ConstraintViolation<UserAccount> constraintViolation : violations) { for (ConstraintViolation<UserAccount> constraintViolation : violations) {
sb.append(constraintViolation.getMessage()); sb.append(constraintViolation.getMessage());
} }
dao.addUserAccount(useraccount);
throw new ConstraintViolationException("Error occurred: " + sb.toString(), violations); throw new ConstraintViolationException("Error occurred: " + sb.toString(), violations);
} }
dao.addUserAccount(useraccount);
return "Account for " + useraccount.getName() + " Added!"; return "Account for " + useraccount.getName() + " Added!";
} }