adamsaghy commented on code in PR #4432:
URL: https://github.com/apache/fineract/pull/4432#discussion_r1991309212
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java:
##########
@@ -439,6 +477,59 @@ private String retrieveTransaction(final Long loanId,
final String loanExternalI
return this.toApiJsonSerializer.serialize(settings, transactionData,
this.responseDataParameters);
}
+ private Page<LoanTransactionData> retrieveTransactions(final Long loanId,
final String loanExternalIdStr, final String excludedTypesStr,
+ Pageable pageable, final UriInfo uriInfo) {
+
+
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
+
+ ExternalId loanExternalId =
ExternalIdFactory.produce(loanExternalIdStr);
+ Long resolvedLoanId = getResolvedLoanId(loanId, loanExternalId);
Review Comment:
Except this way you have a different behaviour if loan id was provided and
external id was provided:
- If API called with loan id there is no check whether the loan is existing
or not... it will simply return 0 transactions
- If API called with external id, there is a check which check whether the
loan is existing or not....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]