Fix(FINERACT-2320): Return false instead of 403 when Loan COB job is disabled
This commit is contained in:
committed by
Adam Saghy
parent
07d67493df
commit
8f2dbe476c
+1
-2
@@ -86,7 +86,6 @@ public class LoanCOBCatchUpApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieves whether Loan COB catch up is running", description = "Retrieves whether Loan COB catch up is running, and the current execution date if it is running.")
|
@Operation(summary = "Retrieves whether Loan COB catch up is running", description = "Retrieves whether Loan COB catch up is running, and the current execution date if it is running.")
|
||||||
public IsCatchUpRunningDTO isCatchUpRunning() {
|
public IsCatchUpRunningDTO isCatchUpRunning() {
|
||||||
return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning)
|
return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null));
|
||||||
.orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user