From 5af5adc26fd37f3676e22e06e84b83f0248d34ad Mon Sep 17 00:00:00 2001 From: Anthony <59890724+narlock@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:46:49 -0500 Subject: [PATCH] Move interface to local host --- .../public/lib/graph/kaizenGraphInterface.js | 2 +- .../lib/graph/kaizenGraphInterface.js.bak | 24 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 KaizenLAN/public/lib/graph/kaizenGraphInterface.js.bak diff --git a/KaizenLAN/public/lib/graph/kaizenGraphInterface.js b/KaizenLAN/public/lib/graph/kaizenGraphInterface.js index bb3a1d5..e9c1079 100644 --- a/KaizenLAN/public/lib/graph/kaizenGraphInterface.js +++ b/KaizenLAN/public/lib/graph/kaizenGraphInterface.js @@ -1,4 +1,4 @@ -const GRAPH_ENDPOINT = "http://192.168.0.35:8080/graphql"; +const GRAPH_ENDPOINT = "http://localhost:8080/graphql"; async function request(query) { const options = { diff --git a/KaizenLAN/public/lib/graph/kaizenGraphInterface.js.bak b/KaizenLAN/public/lib/graph/kaizenGraphInterface.js.bak deleted file mode 100644 index e9c1079..0000000 --- a/KaizenLAN/public/lib/graph/kaizenGraphInterface.js.bak +++ /dev/null @@ -1,24 +0,0 @@ -const GRAPH_ENDPOINT = "http://localhost:8080/graphql"; - -async function request(query) { - const options = { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({query}) - }; - try { - const response = await fetch(GRAPH_ENDPOINT, options); - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - var responseBody = await response.json(); - return responseBody.data - } catch (error) { - console.error('Error fetching data:', error); - alert("An unexpected error occurred when querying kaizen graph - are the APIs running?") - } -} - -export { request } \ No newline at end of file