From d746a0006ff4b6445ce45fad53bb90553cbcbb92 Mon Sep 17 00:00:00 2001 From: yulmam <70622601+yulmam@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:49:11 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor=20:=20report=20=EC=98=A4=ED=83=80?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edufocus/edufocus/report/entity/dto/QuizDto.java | 2 +- .../edufocus/report/service/ReportServiceImpl.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/QuizDto.java b/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/QuizDto.java index d36281f..5dbc56e 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/QuizDto.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/QuizDto.java @@ -18,6 +18,6 @@ public class QuizDto { private String image; private String answer; private String userAnswer; - private boolean isCollect; + private boolean isCorrect; private List choices; } diff --git a/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java b/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java index 3ae6792..b4e637b 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java @@ -54,17 +54,17 @@ public class ReportServiceImpl implements ReportService { for (int idx = 0; idx < answerInputList.size(); idx++) { Quiz quiz = quizList.get(idx); String inputAnswer = answerInputList.get(idx); - boolean isCollect; + boolean isCorrect; Answer answer; if (quiz.getAnswer().equals(inputAnswer)) { correctCount++; - isCollect = true; + isCorrect = true; } else { - isCollect = false; + isCorrect = false; } answer = Answer.builder() .userAnswer(inputAnswer) - .isCorrect(isCollect) + .isCorrect(isCorrect) .report(report) .quiz(quiz) .build(); @@ -106,7 +106,7 @@ public class ReportServiceImpl implements ReportService { .question(quiz.getQuestion()) .answer(quiz.getAnswer()) .userAnswer(answer.getUserAnswer()) - .isCollect(answer.isCorrect()) + .isCorrect(answer.isCorrect()) .choices(choiceDtos) .build(); From 6ba555de6275ba5e185dae9b023ac929141b3aab Mon Sep 17 00:00:00 2001 From: yulmam <70622601+yulmam@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:52:53 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor=20:=20registartion=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../registration/controller/RegistrationController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/registration/controller/RegistrationController.java b/backend/src/main/java/com/edufocus/edufocus/registration/controller/RegistrationController.java index 4b8bba3..2b019c9 100644 --- a/backend/src/main/java/com/edufocus/edufocus/registration/controller/RegistrationController.java +++ b/backend/src/main/java/com/edufocus/edufocus/registration/controller/RegistrationController.java @@ -36,7 +36,7 @@ public class RegistrationController { } @PutMapping("/{registrationId}") - public ResponseEntity acceptRigistration(@RequestHeader("Authorization") String accessToken, @PathVariable long registrationId) { + public ResponseEntity acceptRegistration(@RequestHeader("Authorization") String accessToken, @PathVariable long registrationId) { Long userId = Long.parseLong(jwtUtil.getUserId(accessToken)); if (!registrationService.acceptRegistration(userId, registrationId)) { @@ -47,7 +47,7 @@ public class RegistrationController { } @DeleteMapping("/{registrationId}") - public ResponseEntity deleteRigistration(@RequestHeader("Authorization") String accessToken, @PathVariable long registrationId) { + public ResponseEntity deleteRegistration(@RequestHeader("Authorization") String accessToken, @PathVariable long registrationId) { Long userId = Long.parseLong(jwtUtil.getUserId(accessToken)); if (!registrationService.deleteRegistration(userId, registrationId)) {