From 36f549797a69716330b2e43972f819ce5e38210a Mon Sep 17 00:00:00 2001 From: Mohamed Abaker Date: Sat, 20 Jan 2024 18:33:21 -0500 Subject: [PATCH] fix student add coach --- client/src/Home/api.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/Home/api.tsx b/client/src/Home/api.tsx index 90bce735..391a6994 100644 --- a/client/src/Home/api.tsx +++ b/client/src/Home/api.tsx @@ -43,7 +43,7 @@ async function addBlock(values: any) { const coachPromises: Promise[] = []; pairs.forEach((pair: [IUser, IStudent]) => { - students.add(pair[1].user_id); + students.add(pair[1]._id); coachPromises.push( putData('student/add-coach', { @@ -52,7 +52,6 @@ async function addBlock(values: any) { }), ); }); - console.log(students); await Promise.all(coachPromises);