Skip to content

Commit

Permalink
Regenerate converters
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Oct 7, 2024
1 parent 7f8d7af commit 8c8d7ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, Service
break;
case "payload":
if (member.getValue() instanceof String) {
obj.setPayload(io.vertx.core.buffer.Buffer.buffer(BASE64_DECODER.decode((String)member.getValue())));
obj.setPayload(io.vertx.core.buffer.Buffer.fromJson((String)member.getValue()));
}
break;
}
Expand All @@ -49,7 +49,7 @@ static void toJson(ServiceResponse obj, java.util.Map<String, Object> json) {
json.put("statusMessage", obj.getStatusMessage());
}
if (obj.getPayload() != null) {
json.put("payload", BASE64_ENCODER.encodeToString(obj.getPayload().getBytes()));
json.put("payload", obj.getPayload().toJson());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void testSingleUploadMutation() {
.compose(req -> req.send(bodyBuffer)
.compose(HttpClientResponse::body)
).onComplete(onSuccess(buffer -> {
final JsonObject json = ((JsonObject) buffer.toJson()).getJsonObject("data").getJsonObject("singleUpload");
final JsonObject json = ((JsonObject) buffer.toJsonValue()).getJsonObject("data").getJsonObject("singleUpload");
assertEquals("a.txt", json.getString("id"));
complete();
}));
Expand All @@ -120,7 +120,7 @@ public void testMultipleUploadMutation() {
.setIdleTimeout(10000))
.compose(req -> req.send(bodyBuffer).compose(HttpClientResponse::body))
.onComplete(onSuccess(buffer -> {
final JsonObject json = ((JsonObject) buffer.toJson()).getJsonObject("data").getJsonObject("multipleUpload");
final JsonObject json = ((JsonObject) buffer.toJsonValue()).getJsonObject("data").getJsonObject("multipleUpload");
assertEquals("b.txt c.txt", json.getString("id"));
complete();
}));
Expand Down

0 comments on commit 8c8d7ad

Please sign in to comment.