From e9f1c1e1360e0086f97063fbb28ef4a32c8868be Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Thu, 23 Oct 2025 14:03:38 +0000 Subject: [PATCH] Update geocoding API calls to correctly parse JSON responses Correctly parse the JSON response from the `/api/geocode` endpoint in the Sites page component by calling `.json()` on the response object. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/HdlP8Fl --- client/src/pages/sites.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/pages/sites.tsx b/client/src/pages/sites.tsx index 4f0985a..6348ee4 100644 --- a/client/src/pages/sites.tsx +++ b/client/src/pages/sites.tsx @@ -144,11 +144,12 @@ export default function Sites() { setIsGeocoding(true); try { - const result: any = await apiRequest( + const response = await apiRequest( "POST", "/api/geocode", { address } ); + const result = await response.json(); form.setValue("latitude", result.latitude); form.setValue("longitude", result.longitude); @@ -181,11 +182,12 @@ export default function Sites() { setIsGeocodingEdit(true); try { - const result: any = await apiRequest( + const response = await apiRequest( "POST", "/api/geocode", { address } ); + const result = await response.json(); editForm.setValue("latitude", result.latitude); editForm.setValue("longitude", result.longitude);