Browse Source
Merge pull request #11453 from AldirchEugene/master
Fixed the problem of getAlarmTypes method query failure in rest-client
pull/9455/merge
Andrew Shvayka
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
3 deletions
-
rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java
|
|
|
@ -515,13 +515,16 @@ public class RestClient implements Closeable { |
|
|
|
return restTemplate.postForEntity(baseURL + "/api/alarm", alarm, Alarm.class).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public List<EntitySubtype> getAlarmTypes(PageLink pageLink) { |
|
|
|
public PageData<EntitySubtype> getAlarmTypes(PageLink pageLink) { |
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
addPageLinkToParam(params, pageLink); |
|
|
|
return restTemplate.exchange( |
|
|
|
baseURL + "/api/alarm/types?" + getUrlParams(pageLink), |
|
|
|
HttpMethod.GET, |
|
|
|
HttpEntity.EMPTY, |
|
|
|
new ParameterizedTypeReference<List<EntitySubtype>>() { |
|
|
|
}).getBody(); |
|
|
|
new ParameterizedTypeReference<PageData<EntitySubtype>>() { |
|
|
|
}, |
|
|
|
params).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public AlarmComment saveAlarmComment(AlarmId alarmId, AlarmComment alarmComment) { |
|
|
|
|