Skip to content

Commit

Permalink
Merge pull request #97 from mapillary/fix-mapillary-changeset
Browse files Browse the repository at this point in the history
Fix mapillary changeset
  • Loading branch information
jpietri authored Sep 17, 2019
2 parents 0f7d383 + fb0a20a commit fa4f2e7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.IOException;

import javax.json.Json;
import javax.json.JsonObject;
import javax.swing.JOptionPane;

import org.apache.http.client.methods.CloseableHttpResponse;
Expand Down Expand Up @@ -79,8 +80,9 @@ public void actionPerformed(ActionEvent event) {
CloseableHttpResponse response = httpClient.execute(httpPost);
Logging.debug("HTTP request finished with response code " + response.getStatusLine().getStatusCode());
if (response.getStatusLine().getStatusCode() == 201) {
final String key = Json.createReader(response.getEntity().getContent()).readObject().getString("key");
final String state = Json.createReader(response.getEntity().getContent()).readObject().getString("state");
final JsonObject jsonObject = Json.createReader(response.getEntity().getContent()).readObject();
final String key = jsonObject.getString("key");
final String state = jsonObject.getString("state");
I18n.marktr("rejected");
I18n.marktr("pending");
I18n.marktr("approved");
Expand Down

0 comments on commit fa4f2e7

Please sign in to comment.