From: Mint <> Date: Mon, 8 Aug 2022 11:38:04 +0000 (+0300) Subject: c X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7b6b8d567f23fddfcae7a2bc1cc0c7ba2c59159e;p=fba.git c --- diff --git a/api.py b/api.py index 79d2d2a..db924c6 100644 --- a/api.py +++ b/api.py @@ -72,7 +72,7 @@ def blocked(domain: str = None, reason: str = None): return {"blocks": result} @app.get(base_url+"/") -def index(request: Request, domain: str = None, reason: str = None, wildcards: str = None): +def index(request: Request, domain: str = None, reason: str = None): if domain == "" or reason == "": return responses.RedirectResponse("/") info = None @@ -90,7 +90,7 @@ def index(request: Request, domain: str = None, reason: str = None, wildcards: s if not blocks.ok: raise HTTPException(status_code=blocks.status_code, detail=blocks.text) blocks = blocks.json() - return templates.TemplateResponse("index.html", {"request": request, "domain": domain, "blocks": blocks, "wildcards": wildcards, "reason": reason, "info": info}) + return templates.TemplateResponse("index.html", {"request": request, "domain": domain, "blocks": blocks, "reason": reason, "info": info}) if __name__ == "__main__": uvicorn.run("api:app", host="127.0.0.1", port=port, log_level="info") diff --git a/index.html b/index.html index 9819402..31fcab8 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@
{{block}} - {% if block in wildcards %} + {% if block in blocks.wildcards %} () {% endif %}