fixed setRootRuleChain for Edges

This commit is contained in:
Bohdan Smetaniuk 2020-09-25 13:12:30 +03:00
parent 3f36e15ee6
commit 05a7f3b2de

View File

@ -2029,9 +2029,9 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
}
}
public Optional<RuleChain> setRootRuleChain(RuleChainId ruleChainId, EdgeId edgeId) {
public Optional<Edge> setRootRuleChain(EdgeId edgeId, RuleChainId ruleChainId) {
try {
ResponseEntity<RuleChain> ruleChain = restTemplate.postForEntity(baseURL + "/api/edge/{edgeId}/{ruleChainId}/root", null, RuleChain.class, edgeId.getId(), ruleChainId.getId());
ResponseEntity<Edge> ruleChain = restTemplate.postForEntity(baseURL + "/api/edge/{edgeId}/{ruleChainId}/root", null, Edge.class, edgeId.getId(), ruleChainId.getId());
return Optional.ofNullable(ruleChain.getBody());
} catch (HttpClientErrorException exception) {
if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {