Change fields to be explicit

This commit is contained in:
Nexus 2023-02-23 14:33:50 +00:00
parent 4ba50e7219
commit e2229ce9c0
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -118,10 +118,10 @@ async def authenticate(req: Request, code: str = None, state: str = None):
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"):
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:
raise HTTPException(