Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Team-Umbba/Umbba-Server
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
jun02160 committed Jul 21, 2023
2 parents fd48c7a + 9b57778 commit c45ff6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public enum QuestionSection {
GOLDEN(3L, "청춘시절", 2),
COUPLE(4L, "연애시절", 1),
MARRIAGE(5L, "우리가 만나고", 1),
MARRIAGE2(6L, "우리가 만나고", 1); // 전연령 - 우리가 만나고
MARRIAGE2(5L, "우리가 만나고", 1); // 전연령 - 우리가 만나고
;

private final Long sectionId;
private final Long sectionId; //findBySectionId 하면 안됨
private final String value;
private final int questionCount;
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public void answerTodayQuestion(Long userId, TodayAnswerRequestDto request) {

public List<QnAListResponseDto> getQnaList(Long userId, Long sectionId) {
User myUser = getUserById(userId);
if (sectionId < 1L || sectionId > 5L) {
throw new CustomException(ErrorType.NOT_FOUND_SECTION);
}

Parentchild parentchild = getParentchildByUser(myUser);
List<QnA> qnaList = getQnAListByParentchild(parentchild);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public enum ErrorType {
USER_HAVE_NO_QNALIST(HttpStatus.NOT_FOUND, "해당 유저가 가지고 있는 QnA 데이터가 없습니다."),
PARENTCHILD_HAVE_NO_QNALIST(HttpStatus.NOT_FOUND, "부모자식 관계가 가지고 있는 QnA 데이터가 없습니다."),
PARENTCHILD_HAVE_NO_OPPONENT(HttpStatus.NOT_FOUND, "부모자식 관계에 1명만 참여하고 있습니다."),
NOT_FOUND_SECTION(HttpStatus.NOT_FOUND, "해당 아이디와 일치하는 섹션이 없습니다."),


/**
Expand Down

0 comments on commit c45ff6a

Please sign in to comment.