Browse Source

fixed setRootRuleChain for Edges

pull/2436/head
Bohdan Smetaniuk 6 years ago
parent
commit
05a7f3b2de
  1. 4
      rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

4
rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

@ -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) {

Loading…
Cancel
Save