summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-03 20:00:26 +0100
committerRory& <root@rory.gay>2025-12-03 20:00:26 +0100
commita5a520be060a87769fb2e3616774d2a7f0285dc3 (patch)
tree32fc722cd1aa7c4598b6ccd5866ce578036788e6
parentBump deps (diff)
downloadserver-ts-a5a520be060a87769fb2e3616774d2a7f0285dc3.tar.xz
wtf is wrong with ipdata
-rw-r--r--src/api/routes/auth/register.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts

index 5997b33f..418f0a52 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts
@@ -143,6 +143,9 @@ router.post( const ipData = await IpDataClient.getIpInfo(ip); if (ipData) { + if(!ipData.threat) { + console.log("Invalid IPData.co response, missing threat field", ipData); + } const categories = Object.entries(ipData.threat) .filter(([key, value]) => key.startsWith("is_") && value === true) .map(([key]) => key.replace("is_", ""));