Skip to content

Commit

Permalink
LabelsApi: orgID parameter has to be pass as second argument (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar authored Sep 4, 2019
1 parent 95ee9df commit e15ddaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 1.1.0 [unreleased]

### Bugs
1. [#57](https://github.com/influxdata/influxdb-client-java/pull/57): LabelsApi: orgID parameter has to be pass as second argument

## 1.0.0 [2019-08-30]

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public List<Label> findLabelsByOrg(@Nonnull final Organization organization) {
@Override
public List<Label> findLabelsByOrgId(@Nullable final String orgID) {

Call<LabelsResponse> sourcesCall = service.getLabels(orgID, null);
Call<LabelsResponse> sourcesCall = service.getLabels(null, orgID);

LabelsResponse labels = execute(sourcesCall);
LOG.log(Level.FINEST, "findLabels found: {0}", labels);
Expand Down
1 change: 1 addition & 0 deletions client/src/test/java/com/influxdb/client/ITLabelsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void findLabels() {
@Test
void findLabelsByOrganization() {

labelsApi.createLabel(generateName("Cool Resource"), new HashMap<>(), organization.getId());
Organization organization = influxDBClient.getOrganizationsApi().createOrganization(generateName("org"));

List<Label> labels = labelsApi.findLabelsByOrg(organization);
Expand Down

0 comments on commit e15ddaa

Please sign in to comment.