diff --git a/frontend/src/interface.js b/frontend/src/interface.js index 21a6ed3..6dee641 100644 --- a/frontend/src/interface.js +++ b/frontend/src/interface.js @@ -10,7 +10,7 @@ export async function downloadCodebase() { const apiURL = "https://syntaxsorcerer-backend.fly.dev"; const url = document.getElementById("codebase-url").value; - const response = await fetch(`${local}/api/download`, { + const response = await fetch(`${apiURL}/api/download`, { method: "POST", headers: { "Content-Type": "application/json", @@ -32,7 +32,7 @@ export async function deleteCodebase() { const local = "http://localhost:3000"; const apiURL = "https://syntaxsorcerer-backend.fly.dev"; - const response = await fetch(`${local}/api/delete`, { + const response = await fetch(`${apiURL}/api/delete`, { method: "POST", headers: { "Content-Type": "application/json", @@ -135,7 +135,7 @@ export async function fetchChatGPTResponse(userInput) { const apiURL = "https://syntaxsorcerer-backend.fly.dev"; const codebasePath = "../../codebases"; - const response = await fetch(`${local}/api/chatgpt`, { + const response = await fetch(`${apiURL}/api/chatgpt`, { method: "POST", headers: { "Content-Type": "application/json", @@ -157,7 +157,7 @@ export async function fetchPineconeResponse(userInput) { const local = "http://localhost:3000"; const apiURL = "https://syntaxsorcerer-backend.fly.dev"; - const response = await fetch(`${local}/api/pinecone`, { + const response = await fetch(`${apiURL}/api/pinecone`, { method: "POST", headers: { "Content-Type": "application/json",