Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] 질문별 조회시 답변 총 개수 반환 값 추가 및 lastIndex 생성 오류 수정 #200

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

jaewonLeeKOR
Copy link
Member

PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트

반영 브랜치

fix/#199/getAnswerFix -> develop

변경 사항

  • 질문별 조회시 답변 총 개수 반환 값 추가
    • 질문별 조회, 삭제, 생성 시 캐싱을 진행하여 반환값을 저장, 반환하도록 했습니다.
  • 컨텐츠가 없을 시 반환할 lastIndex 생성 오류 수정
    • Slice로 레포지토리 메서드 반환값을 선언하고 stream을 통해 인덱스의 최대값을 가져오는 과정에서 list가 비어있더라도 데이터를 get 해오게 되어 Exception이 발생함

추가 개발 요구사항

  • /answers/question/{questionId}
    • 자신이 쓴 답변인지 확인하기 위해 답변별로 글쓴이를 따로 조회하여 N+1 문제가 발생함

@jaewonLeeKOR jaewonLeeKOR added the 🌟enhancement New feature or request label Oct 1, 2024
@jaewonLeeKOR jaewonLeeKOR self-assigned this Oct 1, 2024
@jaewonLeeKOR jaewonLeeKOR linked an issue Oct 1, 2024 that may be closed by this pull request
2 tasks
tnals2384
tnals2384 previously approved these changes Oct 1, 2024
Copy link
Contributor

@tnals2384 tnals2384 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

youngeun-dev
youngeun-dev previously approved these changes Oct 1, 2024
Copy link
Contributor

@youngeun-dev youngeun-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jaewonLeeKOR jaewonLeeKOR changed the title Fix/#199/get answer fix [FIX] 질문별 조회시 답변 총 개수 반환 값 추가 및 lastIndex 생성 오류 수정 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 답변 조회 로직 수정
3 participants