adamsaghy commented on code in PR #4828:
URL: https://github.com/apache/fineract/pull/4828#discussion_r2210143943


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java:
##########
@@ -1294,4 +1350,20 @@ private String createLoanDelinquencyAction(Long loanId, 
ExternalId loanExternalI
         return delinquencyActionSerializer.serialize(result);
     }
 
+    private String modifyLoanApprovedAmount(Long loanId, ExternalId 
loanExternalId, String apiRequestBodyAsJson) {
+        Long resolvedLoanId = getResolvedLoanId(loanId, loanExternalId);
+        final CommandWrapperBuilder builder = new 
CommandWrapperBuilder().withJson(apiRequestBodyAsJson);
+        CommandWrapper commandRequest = 
builder.updateLoanApprovedAmount(resolvedLoanId).build();
+
+        final CommandProcessingResult result = 
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
+        return this.toApiJsonSerializer.serialize(result);

Review Comment:
   We can skip the serialization and return directly the 
`CommandProcessingResult` type. 



-- 
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]

Reply via email to