From a84a9741add682ff6789913aa71c6c858bc00ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A7=80?= <80668325+mjms0214@users.noreply.github.com> Date: Fri, 15 Sep 2023 00:02:35 +0900 Subject: [PATCH] Revert "[feat/#69] Fix: auto score" This reverts commit 023dbc8921d75aa5010f80a38b555d503cea7ea9. --- src/components/Submit.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Submit.tsx b/src/components/Submit.tsx index c6905dd..786c90b 100644 --- a/src/components/Submit.tsx +++ b/src/components/Submit.tsx @@ -72,28 +72,27 @@ const Submit: FC = () => { response.data.map((urlmodel: any) => { const apiEP = urlmodel.apiEndpoint; for (let i = 0; i < submittersPropsList.length; i++) { + var student_id = submittersPropsList[i].id; axios .get( apiEP + "/assignment/?id=" + - submittersPropsList[i].id + + student_id + "&assignment_id=" + assignment_id ) .then((response) => { - console.log(response) var answer = JSON.parse(response.data).answer; var runtime = JSON.parse(response.data).runtime; let params = { - user_id: submittersPropsList[i].id, + user_id: student_id, answer: answer.slice(0, -1), // infra comes with /n runtime: 1.0, }; - console.log(params) api.client .post("/assignments/" + assignment_id + "/auto", params) .then(() => { - console.log("자동채점 api 호출") + window.location.reload(); }); }); }