"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)
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":
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")