]> git.mxchange.org Git - fba.git/blobdiff - api.py
Continued:
[fba.git] / api.py
diff --git a/api.py b/api.py
index 9b8276c0c30fd18bd56658ee1814bdf705aa03b3..282b6810aec9bea2691dd62d78ee1e426d35db34 100644 (file)
--- a/api.py
+++ b/api.py
@@ -59,7 +59,6 @@ def api_info():
         "supported_instances": row[1],
         "blocks_recorded"    : row[2],
         "erroneous_instances": row[3],
-        "slogan"             : config.get("slogan"),
     }
 
 @router.get(config.get("base_url") + "/api/scoreboard.json", response_class=JSONResponse)
@@ -72,7 +71,7 @@ def api_scoreboard(mode: str, amount: int):
     elif mode == "blocker":
         database.cursor.execute("SELECT blocker, COUNT(blocker) AS score FROM blocks GROUP BY blocker ORDER BY score DESC LIMIT ?", [amount])
     elif mode == "reference":
-        database.cursor.execute("SELECT origin, COUNT(domain) AS score FROM instances WHERE software IS NOT NULL GROUP BY origin ORDER BY score DESC LIMIT ?", [amount])
+        database.cursor.execute("SELECT origin, COUNT(domain) AS score FROM instances WHERE origin IS NOT NULL GROUP BY origin ORDER BY score DESC LIMIT ?", [amount])
     elif mode == "software":
         database.cursor.execute("SELECT software, COUNT(domain) AS score FROM instances WHERE software IS NOT NULL GROUP BY software ORDER BY score DESC, software ASC LIMIT ?", [amount])
     elif mode == "command":
@@ -267,7 +266,8 @@ def index(request: Request):
     return templates.TemplateResponse("views/index.html", {
         "request": request,
         "theme"  : config.get("theme"),
-        "info"   : response.json()
+        "info"   : response.json(),
+        "slogan" : config.get("slogan"),
     })
 
 @router.get(config.get("base_url") + "/top")