FINERACT-2081: Allow loan charge-off via batch api

This commit is contained in:
adam.magyari
2025-02-13 09:51:58 +01:00
committed by Adam Saghy
parent 2ce1ece4ae
commit e2157501c0
6 changed files with 90 additions and 3 deletions
@@ -65,7 +65,7 @@ public class CreateTransactionByLoanExternalIdCommandStrategy implements Command
final List<String> pathParameters = Splitter.on('/').splitToList(relativeUrlWithoutVersion(request));
final String loanExternalId = pathParameters.get(2);
final Pattern commandPattern = Pattern.compile("^?command=[a-zA-Z]+");
final Pattern commandPattern = Pattern.compile("^?command=[a-zA-Z\\-]+");
final Matcher commandMatcher = commandPattern.matcher(pathParameters.get(3));
if (!commandMatcher.find()) {
@@ -64,7 +64,7 @@ public class CreateTransactionLoanCommandStrategy implements CommandStrategy {
final List<String> pathParameters = Splitter.on('/').splitToList(relativeUrlWithoutVersion(request));
final Long loanId = Long.parseLong(pathParameters.get(1));
final Pattern commandPattern = Pattern.compile("^?command=[a-zA-Z]+");
final Pattern commandPattern = Pattern.compile("^?command=[a-zA-Z\\-]+");
final Matcher commandMatcher = commandPattern.matcher(pathParameters.get(2));
if (!commandMatcher.find()) {