From 119b2e4c2f814ebb3167a134b98e5088e793b7dd Mon Sep 17 00:00:00 2001 From: sanchis <12100597+sanchis@users.noreply.github.com> Date: Wed, 1 May 2024 15:12:06 +0200 Subject: [PATCH] chore: change to fetch --- services/infected.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/infected.js b/services/infected.js index 2ae8d5591..cb4ea1d6b 100644 --- a/services/infected.js +++ b/services/infected.js @@ -44,8 +44,8 @@ export function getNewInfected () { } console.log('FETCH NEW DATA', process.env.NEW_INFECTED_URL) - return axios.get(process.env.NEW_INFECTED_URL) - .then(({ data }) => data) + return fetch(process.env.NEW_INFECTED_URL) + .then((response) => response.json()) .then(({ records }) => ({ infected: extractInfected(records), zones: extractZones(records)