rename var

This commit is contained in:
Nexus 2024-04-19 11:15:42 +01:00
parent f815821cd6
commit 1568833853
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -59,12 +59,12 @@ async def ip(
logging.info("cache expired for %s", ip)
logging.info("looking up IP info for %s", ip)
result = await make_request(
data = await make_request(
ip,
{"User-Agent": User_Agent}
)
if isinstance(result, HTTPException):
return result
if isinstance(data, HTTPException):
return data
data["ip"] = ip
data.pop("legalese", None)
data.pop("source", None)
@ -84,12 +84,12 @@ async def lookup(ip: str = Query(...), User_Agent: str = Header("Mozilla/5.0")):
logging.info("cache expired for %s", ip)
logging.info("looking up IP info for %s", ip)
result = await make_request(
data = await make_request(
ip,
{"User-Agent": User_Agent}
)
if isinstance(result, HTTPException):
return result
if isinstance(data, HTTPException):
return data
data["ip"] = ip
data.pop("legalese", None)
data.pop("source", None)