Fix fetch template string syntax error

This commit is contained in:
2026-09-25 13:02:50 +05:30
parent 3773d0cc51
commit ac5ca7b2bd

View File

@@ -31,7 +31,7 @@ export default function StudentsPage() {
const handleToggleActive = async (studentId: string) => {
try {
const res = await fetchWithAuth(/api/admin/students/\/toggle, {
const res = await fetchWithAuth(`/api/admin/students/${studentId}/toggle`, {
method: "PUT"
})
if (res.ok) {