fix: update API URL for student submissions in CodeChallenge component

This commit is contained in:
ishikabhoyar
2025-10-29 16:43:37 +05:30
parent 47f73681af
commit 4daafa726d

View File

@@ -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}`,