diff --git a/src/main/java/codingFriends_Server/domain/ai/chatGpt/dto/request/ChatGptRequestDto.java b/src/main/java/codingFriends_Server/domain/ai/chatGpt/dto/request/ChatGptRequestDto.java index 6359465..fda87bb 100644 --- a/src/main/java/codingFriends_Server/domain/ai/chatGpt/dto/request/ChatGptRequestDto.java +++ b/src/main/java/codingFriends_Server/domain/ai/chatGpt/dto/request/ChatGptRequestDto.java @@ -19,7 +19,5 @@ public ChatGptRequestDto(String model, String content) { this.messages.add(new Message("system","너는 유능한 IT 개발자야. IT에 관한 지식이 풍부하며 IT 관련 질문에 반드시 답할 수 있어.")); this.messages.add(new Message("user", content)); this.max_tokens = 800; - } - } \ No newline at end of file diff --git a/src/main/java/codingFriends_Server/domain/question/controller/QuestionController.java b/src/main/java/codingFriends_Server/domain/question/controller/QuestionController.java index 215a865..1768a31 100644 --- a/src/main/java/codingFriends_Server/domain/question/controller/QuestionController.java +++ b/src/main/java/codingFriends_Server/domain/question/controller/QuestionController.java @@ -51,13 +51,18 @@ public ResponseEntity getQuestionTitleFromLanguage( String type = memberPrincipal.getMember().getSkill_language(); String level = memberPrincipal.getMember().getUser_level(); - List questionList = questionService.findRandomQuestionsByLanguage(type, level); + Map resultMap = new HashMap<>(); + if (type.equals("상관없음")) { + resultMap.put("level", level); + return ResponseEntity.ok() + .body(resultMap); + } + List questionList = questionService.findRandomQuestionsByLanguage(type, level); if (questionList.isEmpty()) { return ResponseEntity.ok() .body("question이 비어있습니다."); } - Map resultMap = new HashMap<>(); resultMap.put("quiz", questionList); resultMap.put("level", level); return ResponseEntity.ok()