From efd15072cb3c8fb6f04892201d47d1de1aff36e0 Mon Sep 17 00:00:00 2001 From: Ghost_chu Date: Wed, 6 Nov 2024 21:52:23 +0800 Subject: [PATCH] clean up --- .../peerbanhelper/module/impl/webapi/PBHChartController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();