You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "adamsaghy (via GitHub)" <gi...@apache.org> on 2023/03/09 12:07:36 UTC
[GitHub] [fineract] adamsaghy commented on a diff in pull request #3028: [FINERACT-1751] Add savings account transaction request to Batch API
adamsaghy commented on code in PR #3028:
URL: https://github.com/apache/fineract/pull/3028#discussion_r1130912504
##########
fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java:
##########
@@ -128,7 +128,21 @@ private static void init() {
commandStrategies.put(
CommandContext.resource("loans\\/external-id\\/" + UUID_PARAM_REGEX + OPTIONAL_QUERY_PARAM_REGEX).method(GET).build(),
"getLoanByExternalIdCommandStrategy");
+ commandStrategies.put(CommandContext.resource("savingsaccounts\\/" + NUMBER_REGEX + OPTIONAL_QUERY_PARAM_REGEX).method(GET).build(),
Review Comment:
You can use a generic command strategy to cover all these scenarios like:
`SavingsAccountTransactionCommandStrategy` and use
```
final Map<String, String> queryParameters = CommandStrategyUtils.getQueryParameters(relativeUrl);
final String command = queryParameters.get("command");
```
to get the command query param
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org