Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zalejko committed Sep 25, 2022
1 parent cbc2852 commit a8bcea7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class AccountController {

@PostMapping("/accounts")
AccountOwner createAccount(@RequestBody AccountOwnerService.CreateAccountDto dto) {
return service.createAccount(dto);
return service.createAccountOwner(dto);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class AccountOwnerService {
private final AccountOwnerRepository accountOwnerRepository;

public AccountOwner createAccount(@NonNull CreateAccountDto dto) {
public AccountOwner createAccountOwner(@NonNull CreateAccountDto dto) {
var newAccount = AccountOwner.newAccountOwner(dto.name, dto.surname, BigDecimal.valueOf(dto.initBalance));
return accountOwnerRepository.save(newAccount);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class MoneyTransferService {

// @Transactional
//@Transactional("chainedKafkaJpaTransactionManager")


public void sendMoney(@NonNull SendMoneyDto dto) {
var from = accountRepository.findById(dto.from).orElseThrow();
var to = accountRepository.findById(dto.to).orElseThrow();
Expand Down

0 comments on commit a8bcea7

Please sign in to comment.