Refactored students
This commit is contained in:
@@ -22,7 +22,7 @@ export default function ConsultStudents() {
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const response = await fetch("/students/api/insert_students");
|
||||
const response = await fetch("/students/api/students");
|
||||
if (!response.ok) {
|
||||
throw new Error(`Error fetching data: ${response.statusText}`);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function UploadStudents() {
|
||||
|
||||
console.log(`Data from sheet ${sheetName}:`, data);
|
||||
|
||||
const response = await fetch("/students/api/insert_students", {
|
||||
const response = await fetch("/students/api/students", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ promoName: sheetName, data }),
|
||||
|
||||
Reference in New Issue
Block a user