fix: add Content-Type for bulk delete
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user