fix: update API URL for student submissions in CodeChallenge component
This commit is contained in:
@@ -560,8 +560,8 @@ int main() {
|
|||||||
try {
|
try {
|
||||||
// If we have real test data, submit to faculty backend
|
// If we have real test data, submit to faculty backend
|
||||||
if (currentQuestion && test) {
|
if (currentQuestion && test) {
|
||||||
const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:5000';
|
const apiUrl = import.meta.env.VITE_FACULTY_API_URL || 'http://localhost:5000/api';
|
||||||
const response = await fetch(`${apiUrl}/api/students/submissions`, {
|
const response = await fetch(`${apiUrl}/students/submissions`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${token}`,
|
'Authorization': `Bearer ${token}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user