[FEAT] 데이트 코스 필터링 조회(메인) API 구현 - #79 #83
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔥Pull requests
⛳️ 작업한 브랜치
👷 작업한 내용
데이트 코스 필터링 조회(메인) API를 구현했습니다.
메인에서 최신순과 인기순으로 불러오는 API를 공통적으로 사용하기 위해 RequestParam으로 sortBy를 받아 조회 방법을 구별합니다.
실제 받아온 값으로 CourseService 로직에서 값을 비교해 조회합니다.
각각 조회의 반환 갯수가 다르기 때문에 다른 메서드를 통해 구해줬으며, dto로 변환하는 것은 기존의 메서드를 재사용했습니다.
최신순일 경우 가장 최근에 작성한 코스가 3개 반환되며, 인기순일 경우 좋아요의 개수가 가장 많은 순으로 작성한 코스 5개가 반환됩니다.
🚨 참고 사항
📟 관련 이슈