"scores" : json_helper.from_response(response)
})
-@router.get(config.get("base_url") + "/")
-def index(request: Request):
- # Get info
- response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/info.json")
-
- if not response.ok:
- raise HTTPException(status_code=response.status_code, detail=response.text)
-
- return templates.TemplateResponse("views/index.html", {
- "request": request,
- "theme" : config.get("theme"),
- "info" : response.json(),
- "slogan" : config.get("slogan"),
- })
-
@router.get(config.get("base_url") + "/list")
def list_domains(request: Request, mode: str, value: str, amount: int = config.get("api_limit")):
if mode == "detection_mode" and not instances.valid(value, "detection_mode"):
"base_url": config.get("base_url")
})
+@router.get(config.get("base_url") + "/")
+def index(request: Request):
+ # Get info
+ response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/info.json")
+
+ if not response.ok:
+ raise HTTPException(status_code=response.status_code, detail=response.text)
+
+ return templates.TemplateResponse("views/index.html", {
+ "request": request,
+ "theme" : config.get("theme"),
+ "info" : response.json(),
+ "slogan" : config.get("slogan"),
+ })
+
if __name__ == "__main__":
uvicorn.run("daemon:router", host=config.get("host"), port=config.get("port"), log_level=config.get("log_level"))
elif software in ["hometown", "ecko"] or "mastodon" in software:
logger.debug("Setting mastodon: software='%s'", software)
software = "mastodon"
- elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns"] or "shumihub" in software or "мисскей" in software:
+ elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish"] or "shumihub" in software or "мисскей" in software:
logger.debug("Setting misskey: software='%s'", software)
software = "misskey"
elif software in ["runtube.re", "islameye"]: