Fix fetch template string syntax error
This commit is contained in:
@@ -31,7 +31,7 @@ export default function StudentsPage() {
|
|||||||
|
|
||||||
const handleToggleActive = async (studentId: string) => {
|
const handleToggleActive = async (studentId: string) => {
|
||||||
try {
|
try {
|
||||||
const res = await fetchWithAuth(/api/admin/students/\/toggle, {
|
const res = await fetchWithAuth(`/api/admin/students/${studentId}/toggle`, {
|
||||||
method: "PUT"
|
method: "PUT"
|
||||||
})
|
})
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user