mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Change fields to be explicit
This commit is contained in:
parent
4ba50e7219
commit
e2229ce9c0
1 changed files with 2 additions and 2 deletions
|
@ -118,10 +118,10 @@ async def authenticate(req: Request, code: str = None, state: str = None):
|
||||||
detail="Student not found. Please run /verify first."
|
detail="Student not found. Please run /verify first."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Now send a request to https://ip-api.com/json/{ip}?fields=25328
|
# Now send a request to https://ip-api.com/json/{ip}?fields=status,city,zip,lat,lon,isp,query
|
||||||
if req.client.host not in ("127.0.0.1", "localhost", "::1"):
|
if req.client.host not in ("127.0.0.1", "localhost", "::1"):
|
||||||
response = app.state.http.get(
|
response = app.state.http.get(
|
||||||
f"http://ip-api.com/json/{req.client.host}?fields=25328"
|
f"http://ip-api.com/json/{req.client.host}?fields=status,city,zip,lat,lon,isp,query"
|
||||||
)
|
)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
Loading…
Reference in a new issue