Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated endpoints #10

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
Loading