fixed getDate()
This commit is contained in:
@@ -52,7 +52,7 @@ public class AccountQueryController {
|
|||||||
public ResponseEntity<AccountHistoryResponse> getTransactionsHistory(@PathVariable String accountId) {
|
public ResponseEntity<AccountHistoryResponse> getTransactionsHistory(@PathVariable String accountId) {
|
||||||
AccountInfo accountInfo = accountInfoQueryService.findByAccountId(accountId);
|
AccountInfo accountInfo = accountInfoQueryService.findByAccountId(accountId);
|
||||||
List<AccountHistoryEntry> historyEntries = new ArrayList<>();
|
List<AccountHistoryEntry> historyEntries = new ArrayList<>();
|
||||||
historyEntries.add(new AccountOpenInfo(accountInfo.getDate(), AccountHistoryEntry.EntryType.account, accountInfo.getChanges().get(0).getAmount()));
|
historyEntries.add(new AccountOpenInfo(accountInfo.getCreationDate(), AccountHistoryEntry.EntryType.account, accountInfo.getChanges().get(0).getAmount()));
|
||||||
accountInfo.getTransactions().forEach(historyEntries::add);
|
accountInfo.getTransactions().forEach(historyEntries::add);
|
||||||
|
|
||||||
return ResponseEntity.ok().body(new AccountHistoryResponse(historyEntries));
|
return ResponseEntity.ok().body(new AccountHistoryResponse(historyEntries));
|
||||||
|
|||||||
Reference in New Issue
Block a user