From fa797719c3272e2514a75e71cf4f2f1c4b29c938 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 6 Sep 2024 15:37:01 -0500 Subject: [PATCH] Add api --- src/state/geolocation.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state/geolocation.tsx b/src/state/geolocation.tsx index cd076d4a7c..e6f10e3369 100644 --- a/src/state/geolocation.tsx +++ b/src/state/geolocation.tsx @@ -28,13 +28,13 @@ export const DEFAULT_GEOLOCATION: Device['geolocation'] = { } async function getGeolocation(): Promise { - const res = await fetch(`https://api.bsky.app/xrpc/_health`) + const res = await fetch(`https://ipapi.bsky.workers.dev/`) if (!res.ok) { throw new Error(`geolocation: lookup failed ${res.status}`) } - const json = {country_code: 'BR'} // await res.json() + const json = await res.json() if (json.country_code) { return {