From 4daafa726dca0194623e51efac88b9eef9cd5b3f Mon Sep 17 00:00:00 2001 From: ishikabhoyar Date: Wed, 29 Oct 2025 16:43:37 +0530 Subject: [PATCH] fix: update API URL for student submissions in CodeChallenge component --- Frontend/src/components/CodeChallenge.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/src/components/CodeChallenge.jsx b/Frontend/src/components/CodeChallenge.jsx index da41738..21e14a9 100644 --- a/Frontend/src/components/CodeChallenge.jsx +++ b/Frontend/src/components/CodeChallenge.jsx @@ -560,8 +560,8 @@ int main() { try { // If we have real test data, submit to faculty backend if (currentQuestion && test) { - const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:5000'; - const response = await fetch(`${apiUrl}/api/students/submissions`, { + const apiUrl = import.meta.env.VITE_FACULTY_API_URL || 'http://localhost:5000/api'; + const response = await fetch(`${apiUrl}/students/submissions`, { method: 'POST', headers: { 'Authorization': `Bearer ${token}`,