josehernandezfintecheandomx commented on code in PR #2687:
URL: https://github.com/apache/fineract/pull/2687#discussion_r1001842870
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java:
##########
@@ -786,13 +786,22 @@ public String
calculateLoanScheduleOrSubmitLoanApplication(
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content =
@Content(schema = @Schema(implementation =
LoansApiResourceSwagger.PutLoansLoanIdResponse.class))) })
public String modifyLoanApplication(@PathParam("loanId")
@Parameter(description = "loanId") final Long loanId,
+ @QueryParam("command") @Parameter(description = "command") final
String commandParam,
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
- final CommandWrapper commandRequest = new
CommandWrapperBuilder().updateLoanApplication(loanId).withJson(apiRequestBodyAsJson)
- .build();
+ final CommandWrapperBuilder builder = new
CommandWrapperBuilder().withJson(apiRequestBodyAsJson);
+ CommandWrapper commandRequest = null;
+ if (CommandParameterUtil.is(commandParam,
LoanApiConstants.MARK_AS_FRAUD_COMMAND)) {
+ commandRequest = builder.markAsFraud(loanId).build();
+ } else {
+ commandRequest = builder.updateLoanApplication(loanId).build();
+ }
- final CommandProcessingResult result =
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
+ if (commandRequest == null) {
Review Comment:
Removed
--
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]