diff --git a/frontend/src/App.js b/frontend/src/App.js index 7f93ea2..6e28161 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -49,7 +49,7 @@ function App() { }; const updateUserMetrics = (isCorrect) => { - fetch(`/api/metrics?userId=${userId}`) + fetch(`/metrics?userId=${userId}`) .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); @@ -69,7 +69,7 @@ function App() { incorrectAnswers: newIncorrectAnswers, }; - return fetch(`${process.env.REACT_APP_API_URL}/api/metrics`, { + return fetch(`${process.env.REACT_APP_API_URL}/metrics`, { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -112,7 +112,7 @@ function App() { console.log('Sending performance data:', performanceData); - fetch(`${process.env.REACT_APP_API_URL}/api/performance`, { + fetch(`${process.env.REACT_APP_API_URL}/performance`, { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -167,7 +167,7 @@ function App() { const decodedToken = jwtDecode(idToken); console.log('Decoded Token:', decodedToken); - fetch(`${process.env.REACT_APP_API_URL}/api/login`, { + fetch(`${process.env.REACT_APP_API_URL}/login`, { method: 'POST', headers: { 'Content-Type': 'application/json',