Skip to content

Commit

Permalink
[Fix] Remove duplication of parameters by request processing
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Jul 10, 2022
1 parent ba1151e commit 6f49666
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,7 @@ public Model processPostRequest(
@RequestParam MultiValueMap<String, String> parameters
) {
LOG.info("Processing POST request.");
// TODO process internal params by passing to runModule() instead of this
addIfNotNull(parameters, P_ID, pId);
addIfNotNull(parameters, P_CONFIG_URL, pConfigURL);
addIfNotNull(parameters, P_INPUT_GRAPH_URL, pInputGraphURL);
addIfNotNull(parameters, P_INPUT_BINDING_URL, pInputBindingURL);
addIfNotNull(parameters, P_OUTPUT_BINDING_URL, pOutputBindingURL);
// TODO process internal params passed arguments not parameters map
return runModule(inputModel, parameters);
}

Expand Down Expand Up @@ -390,10 +385,4 @@ private void extendBindingFromURL(VariablesBinding inputVariablesBinding, URL in

}

private void addIfNotNull(MultiValueMap<String, String> parameters, String name, String value) {
if (value != null) {
parameters.add(name, value);
}
}

}

0 comments on commit 6f49666

Please sign in to comment.