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

[#46] Refactor : 댓글 API 리팩토링 #48

Merged
merged 20 commits into from
Aug 25, 2023
Merged

Commits on Aug 21, 2023

  1. feat : 댓글 조회 API 생성

    - 댓글 조회 API 를 새로 생성하여 postId 에 대한 댓글을 조회 하도록 설정하였습니다.
    - URL 매핑을 클래스 단위로 변경하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    4a9c7a0 View commit details
    Browse the repository at this point in the history
  2. feat : 댓글 리스트 조회 메서드 추가

    - 게시글의 대한 댓글을 조회 하는 메서드를 추가하였습니다.
    - 댓글중 부모의 아이디가 없을 경우 제외 하도록 했습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    7f5d125 View commit details
    Browse the repository at this point in the history
  3. feat : Response 필드 추가

    - 댓글의 작성자가 필요하다는 요청을 받아 Response 에 추가하였습니다.
    - Mapper 도 함께 변경하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    45d5540 View commit details
    Browse the repository at this point in the history
  4. chore : Comment fetch 옵션 수정

    - 댓글로 Post 객체 그래프 탐색은 필요하지 않다고 생각하여, 지연 로딩을 적용하였습니다.
    - Emoji 는 BatchSize 100 을 설정하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    8c2ac71 View commit details
    Browse the repository at this point in the history
  5. chore : Post fetch 옵션 수정

    - comment , emoji 배치 사이즈를 `50` -> `100` 으로 수정하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    4e08c81 View commit details
    Browse the repository at this point in the history
  6. chore : 게시글 상세 조회 수정

    - 게시글 상세 조회 시 더 이상 댓글을 함께 반환 할 필요가 없어 `comment` 조인을 제거 하였습니다.
    - `comment` 를 `Emojis` 로 변경하여 게시글 상세 조회 시 실행되는 쿼리의 횟수를 줄이고자 수정하였습니다.
    - join 되는 테이블이 변경됨에 따라 메서드 명을 `joinMemberAndComment` ->  `joinMemberAndEmojis` 로 변경하였습니다.
    - 메서드 변경에 따른 해당 메서드를 사용하는 클래스들도 함께 수정하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    274d05c View commit details
    Browse the repository at this point in the history
  7. chore : Response 타입 수정

    - 게시글 상세 조회 시 더 이상 댓글을 조회 하지 않으므로 필드에서 제거하였습니다.
    gombasan committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    497fb4e View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. config : batch size 기본 설정 추가

    - jpa 의 기본 배치 사이즈 설정을 추가하였습니다.
    - 해당 설정이 추가됨에 따라 기존 `@BatchSize` 를 제거하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    593a396 View commit details
    Browse the repository at this point in the history
  2. feat(Test) : 댓글 조회 테스트 추가

    - 댓글 조회 API 를 분리하여 테스트를 추가하였습니다.
    - 기존 문서화 내용 부분중 잘못 입력되어 있는 부분을 수정하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    5c6f727 View commit details
    Browse the repository at this point in the history
  3. chore(Test) : 게시글 조회 시 댓글 검증 삭제

    - 댓글 조회 API 를 분리함에 따라 게시글 조회 시 댓글을 검증 및 문서화 하는 코드를 삭제하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    8515ab1 View commit details
    Browse the repository at this point in the history
  4. refactor : 게시글 조회 쿼리 수정

    - 현재 게시글 리스트 조회시에는 순수한 `Post` 자체의 조회 보다는 형태를 많이 수정하여 요약된 정보를 조회 하고있다고 생각하여 쿼리문을 수정하였습니다.
    - 댓글의 갯수, 이모지의 갯수 등 데이터를 조회 한 후에 처리하는 것이 아닌 DB 자체의 기능을 활용하여 조회 시점에서 `PostResponse` 로 조회 하는것이 더 성능적으로 올바르다고 생각하여 수정하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    738386f View commit details
    Browse the repository at this point in the history
  5. chore : PostResponse queryDsl 설정 추가

    - `@QueryProjection` 을 추가하여 `PostResponse` 도 `QPostResponse` 를 생성 할 수 있도록 추가하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    cbb9ccd View commit details
    Browse the repository at this point in the history
  6. chore : PostResponse 매핑 메서드 삭제

    - PostResponse 를 쿼리로 직접 사용하기 때문에 더 이상 데이터 매핑이 필요하지 않아 제거하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    c68bc8b View commit details
    Browse the repository at this point in the history
  7. chore(Test) : PostRepository 테스트 수정

    - 테스트 내용이 충분히 검증하도록 테스트 케이스를 추가하였습니다.
    - 이모지와 댓글이 게시글 조회 시점에 정상적으로 `count` 여부를 확인하기 위한 테스트를 추가하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    7266982 View commit details
    Browse the repository at this point in the history
  8. feat : 댓글 조회 API 문서화 추가

    - 댓글 조회 API 문서 내용을 추가하였습니다.
    gombasan committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    8b846c1 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. feat : 댓글 삭제 API 추가

    - 댓글을 삭제하는 API 를 추가하였습니다.
    - 댓글의 삭제 요청하는 memberId 와 댓글의 작성자 아이디를 비교하여 둘이 동일하다면 삭제 처리합니다.
    gombasan committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    dbf66bc View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. feat(Test) : 댓글 테스트 코드 추가

    - 댓글 삭제 테스트 코드를 추가하였습니다.
    - 댓글 수정 및 삭제 시 권한 예외가 발생하는 테스트를 추가하였습니다.
    gombasan committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    9e9eb15 View commit details
    Browse the repository at this point in the history
  2. feat(Test) : 대댓글 팩터리 메서드 추가

    - 대댓글도 생성하여 사용할 수 있게 추가하였습니다.
    gombasan committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    99e9b79 View commit details
    Browse the repository at this point in the history
  3. feat : 댓글 삭제 API 문서화

    - 댓글 삭제 API를 문서화 하였습니다.
    gombasan committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    7149378 View commit details
    Browse the repository at this point in the history
  4. fix : 생성 날짜 검증 오류 수정

    - 생성 날짜 검증 시 초 단위가 서로 달라 검증이 실패하는 에러가 발생하여 해당 검증은 제외하도록 하였습니다.
    gombasan committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    13bec18 View commit details
    Browse the repository at this point in the history