diff --git a/plugin-nabu/src/main/java/ca/on/oicr/gsi/shesmu/nabu/ArchiveCaseAction.java b/plugin-nabu/src/main/java/ca/on/oicr/gsi/shesmu/nabu/ArchiveCaseAction.java index b542d9d04..7b9a9d0b6 100644 --- a/plugin-nabu/src/main/java/ca/on/oicr/gsi/shesmu/nabu/ArchiveCaseAction.java +++ b/plugin-nabu/src/main/java/ca/on/oicr/gsi/shesmu/nabu/ArchiveCaseAction.java @@ -3,7 +3,7 @@ import ca.on.oicr.gsi.prometheus.LatencyHistogram; import ca.on.oicr.gsi.shesmu.plugin.*; import ca.on.oicr.gsi.shesmu.plugin.action.*; -import ca.on.oicr.gsi.shesmu.plugin.json.JsonListBodyHandler; +import ca.on.oicr.gsi.shesmu.plugin.json.JsonBodyHandler; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -198,7 +198,7 @@ public ActionState perform( try (var timer = NabuRequestTime.start(baseUrl)) { var response = - HTTP_CLIENT.send(request, new JsonListBodyHandler<>(MAPPER, NabuCaseArchiveDto.class)); + HTTP_CLIENT.send(request, new JsonBodyHandler<>(MAPPER, NabuCaseArchiveDto.class)); if (response.statusCode() == 409) { return ActionState.HALP; } else if (response.statusCode() / 100 != 2) { @@ -208,8 +208,8 @@ public ActionState perform( } else if (response.statusCode() == 201) { return ActionState.INFLIGHT; } else if (response.statusCode() == 200) { - final var results = response.body().get().collect(Collectors.toList()); - return actionStatusFromArchive(results.get(0)); + final var results = response.body().get(); + return actionStatusFromArchive(results); } else { return ActionState.UNKNOWN; }