From 623d75abaa4b565ba5f2e620e2fadf26a9f394f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 30 May 2023 05:14:10 +0200 Subject: [PATCH] Continued: - only list entries where the software has been detected - still this will list non-fediverse "instances" such as normal websites --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index 520cad0..b37e555 100644 --- a/api.py +++ b/api.py @@ -56,7 +56,7 @@ def top(blocked: int = None, blockers: int = None, reference: int = None, softwa elif reference != None: if reference > 500: raise HTTPException(status_code=400, detail="Too many results") - fba.cursor.execute("SELECT origin, COUNT(domain) FROM instances GROUP BY origin ORDER BY COUNT(domain) DESC LIMIT ?", [reference]) + fba.cursor.execute("SELECT origin, COUNT(domain) FROM instances WHERE software IS NOT NULL GROUP BY origin ORDER BY COUNT(domain) DESC LIMIT ?", [reference]) elif software != None: if software > 500: raise HTTPException(status_code=400, detail="Too many results") -- 2.39.5