From 5ebd01c97e84f66557ae668e10d566fb332dc9ee Mon Sep 17 00:00:00 2001 From: ectasy663 Date: Thu, 24 Sep 2026 21:01:48 +0530 Subject: [PATCH] fix: Admin students Bulk CSV fetch url --- src/app/admin/students/page.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/admin/students/page.tsx b/src/app/admin/students/page.tsx index 579f2c1..b68e6dc 100644 --- a/src/app/admin/students/page.tsx +++ b/src/app/admin/students/page.tsx @@ -35,12 +35,9 @@ export default function StudentsPage() { try { const formData = new FormData() formData.append("file", file) - const rawRes = await fetch(process.env.NEXT_PUBLIC_API_URL ? `${process.env.NEXT_PUBLIC_API_URL}/api/admin/students/bulk` : "http://localhost:8000/api/admin/students/bulk", { + const rawRes = await fetchWithAuth("/api/admin/students/bulk", { method: "POST", body: formData, - headers: { - "Authorization": `Bearer ${localStorage.getItem("active_session_token")}` - } }) if (!rawRes.ok) throw new Error("Upload failed")