diff --git a/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHChartController.java b/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHChartController.java index 8c5f6fd16..26ede1d39 100644 --- a/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHChartController.java +++ b/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHChartController.java @@ -119,7 +119,7 @@ private void handlePeerTrends(Context ctx) throws Exception { .le("banAt", timeQueryModel.endAt()); if (downloader != null && !downloader.isBlank()) { queryConnected.and().eq("downloader", new SelectArg(downloader)); - queryBanned.and().eq("downloader", new SelectArg( downloader)); + queryBanned.and().eq("downloader", new SelectArg(downloader)); } try (var it = queryConnected.iterator()) { while (it.hasNext()) { @@ -185,6 +185,7 @@ private void handleGeoIP(Context ctx) throws Exception { public boolean hasNext() { return bannedOnly ? itBanned.hasNext() : itConnected.hasNext(); } + @Override public String next() { return bannedOnly ? itBanned.next().getIp() : itConnected.next().getAddress();