fix: add Content-Type for bulk delete

This commit is contained in:
2026-09-24 21:27:12 +05:30
parent e164540510
commit 6ba69a05ea

View File

@@ -82,6 +82,7 @@ export default function StudentsPage() {
try { try {
const res = await fetchWithAuth("/api/admin/students/bulk", { const res = await fetchWithAuth("/api/admin/students/bulk", {
method: "DELETE", method: "DELETE",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ user_ids: selectedIds }) body: JSON.stringify({ user_ids: selectedIds })
}) })
if (!res.ok) throw new Error("Delete failed") if (!res.ok) throw new Error("Delete failed")