From: Roland Häder Date: Tue, 30 May 2023 03:14:10 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=623d75abaa4b565ba5f2e620e2fadf26a9f394f2;p=fba.git Continued: - only list entries where the software has been detected - still this will list non-fediverse "instances" such as normal websites --- 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")