From: Roland Häder Date: Sat, 20 May 2023 05:28:08 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96456f1100654dd2c94f38d452fcaf770d30d8e8;p=fba.git Continued: - copy-paste mistake fixed - it must be 'port' --- diff --git a/api.py b/api.py index df4c1f8..2f94925 100644 --- a/api.py +++ b/api.py @@ -85,13 +85,13 @@ def index(request: Request, blockers: int = None, blocked: int = None): if blockers == None and blocked == None: raise HTTPException(status_code=400, detail="No filter specified") elif blockers != None: - scores = get(f"http://127.0.0.1:{fba.config['base_url']}{fba.config['base_url']}/top?blockers={blockers}") + scores = get(f"http://127.0.0.1:{fba.config['port']}{fba.config['base_url']}/top?blockers={blockers}") elif blocked != None: scores = get(f"http://127.0.0.1:{fba.config['port']}{fba.config['base_url']}/top?blocked={blocked}") if scores != None: if not scores.ok: - raise HTTPException(status_code=blocks.status_code, detail=blocks.text) + raise HTTPException(status_code=scores.status_code, detail=scores.text) scores = scores.json()