Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kailash committed Nov 18, 2021
1 parent 1c47c74 commit e194504
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public Future<Boolean> isItemExist(String id) {
if (responseHandler.succeeded()) {
HttpResponse<Buffer> response = responseHandler.result();
JsonObject responseBody = response.bodyAsJsonObject();
if (responseBody.getString("status").equalsIgnoreCase("urn:dx:cat:Success")
if (responseBody.getString("type").equalsIgnoreCase("urn:dx:cat:Success")
&& responseBody.getInteger("totalHits") > 0) {
promise.complete(true);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private Future<Boolean> isResourceExist(String id, String groupACL) {
JsonObject responseBody = response.bodyAsJsonObject();
if (response.statusCode() != HttpStatus.SC_OK) {
promise.fail("false");
} else if (!responseBody.getString("status").equals("success")) {
} else if (!responseBody.getString("type").equals("urn:dx:cat:Success")) {
promise.fail("Not Found");
return;
} else if (responseBody.getInteger("totalHits") == 0) {
Expand Down Expand Up @@ -319,7 +319,7 @@ private Future<String> getGroupAccessPolicy(String groupId) {
return;
}
JsonObject responseBody = response.bodyAsJsonObject();
if (!responseBody.getString("status").equals("success")) {
if (!responseBody.getString("type").equals("urn:dx:cat:Success")) {
promise.fail("Resource not found");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Future<JsonObject> registerStreamingSubscription(JsonObject request) {
array.add(exchangeName + Constants.DATA_WILDCARD_ROUTINGKEY);
} else {
exchangeName = routingKey.substring(0, routingKey.lastIndexOf("/"));
array.add(routingKey);
array.add(exchangeName+"/."+routingKey.substring(routingKey.lastIndexOf("/")+1));
}
JsonObject json = new JsonObject();
json.put(EXCHANGE_NAME, exchangeName);
Expand Down Expand Up @@ -272,7 +272,7 @@ Future<JsonObject> updateStreamingSubscription(JsonObject request) {
array.add(exchangeName + Constants.DATA_WILDCARD_ROUTINGKEY);
} else {
exchangeName = routingKey.substring(0, routingKey.lastIndexOf("/"));
array.add(routingKey);
array.add(exchangeName+"/."+routingKey.substring(routingKey.lastIndexOf("/")+1));
}
JsonObject json = new JsonObject();
json.put(EXCHANGE_NAME, exchangeName);
Expand Down Expand Up @@ -391,7 +391,7 @@ Future<JsonObject> appendStreamingSubscription(JsonObject request) {
array.add(exchangeName + Constants.DATA_WILDCARD_ROUTINGKEY);
} else {
exchangeName = routingKey.substring(0, routingKey.lastIndexOf("/"));
array.add(routingKey);
array.add(exchangeName+"/."+routingKey.substring(routingKey.lastIndexOf("/")+1));
}
JsonObject json = new JsonObject();
json.put(EXCHANGE_NAME, exchangeName);
Expand Down

0 comments on commit e194504

Please sign in to comment.