Skip to content

Commit

Permalink
refactor: 질문 목록 조회 메소드명 변경 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
623nana committed Aug 4, 2021
1 parent 3bdb5aa commit f05dd74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public BaseResponse<List<OptionResponse>> findAllOptions() {
}

@GetMapping("/letters/options/{optionId}")
public BaseResponse<List<QuestionResponse>> questions(@PathVariable("optionId") Long optionId) {
List<QuestionResponse> questions = letterService.findQuestions(optionId);
public BaseResponse<List<QuestionResponse>> findQuestionsByOptionId(@PathVariable("optionId") Long optionId) {
List<QuestionResponse> questions = letterService.findQuestionsByOptionId(optionId);
return new BaseResponse<>(200, 0, "", questions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public List<OptionResponse> findAllOptions() {
}

@Transactional(readOnly = true)
public List<QuestionResponse> findQuestions(Long questionId) {
public List<QuestionResponse> findQuestionsByOptionId(Long questionId) {
return questionRepository.findQuestionsBySendOptionIdEqualsOrSendOptionIdEquals(questionId, 3L)
.stream()
.map(QuestionResponse::new)
Expand Down

0 comments on commit f05dd74

Please sign in to comment.