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

[FEAT] 곡 검색하기 구현, 보관함-좋아요 뮤멘트 추가사항 #14 #15 #17

Merged
merged 4 commits into from
Jul 16, 2022

Conversation

kimchaeeun3447
Copy link
Contributor

💿 DESCRIPTION

  1. 곡 검색하기 : 곡 검색창에 입력한 keyword가 곡 제목/아티스트 명에 포함된 음악들의 리스트 가져오기 [FEAT] 곡 검색하기 #15

  2. 보관함-좋아요 뮤멘트 [FEAT] 보관함 좋아요한 뮤멘트 리스트 조회, 필터링 #14 :

  • 좋아요한 user와 music의 _id 필드 추가
  • 유저의 Like 다큐먼트 내부의 mument 리스트 최신순 정렬

🎙 RELATED ISSUE

#14 #15

💃 REVIEW POINT

  • regex를 이용한 검색 쿼리 작성했어요!
  • Like 다큐먼트의 mument 필드에 대해 리스트 최신순 정렬했어요!

- Controller, Service, DTO 구현
- Router 추가
- 좋아요한 유저와 음악의 _id 필드 추가
- DTO에 필요한 필드 추가
-
@kimchaeeun3447 kimchaeeun3447 requested a review from hujumee July 16, 2022 19:22
Copy link
Contributor

@hujumee hujumee left a comment

Choose a reason for hiding this comment

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

고생했어요 ~~! 조금만 더 화이팅

@@ -81,7 +81,7 @@ const getMyMumentList = async (userId: string): Promise<UserMumentListResponseDt

const getLikeMumentList = async (userId: string): Promise<UserMumentListResponseDto | null> => {
try {
const myMumentList = await Like.findOne({
const myMumentList: LikeInfo | null = await Like.findOne({
Copy link
Contributor

Choose a reason for hiding this comment

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

타입 지정 잊지 말아요 우리~

return +new Date(a.createdAt) - +new Date(b.createdAt);
});

console.log(myMumentList.mument);
Copy link
Contributor

Choose a reason for hiding this comment

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

console.log 는 테스트 완료 후 삭제하고 push해줍시다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아코 넵!!

@@ -15,4 +15,6 @@ router.get('/:musicId/:userId/order', [
query('default').isString().isIn(['Y', 'N']),
], MusicController.getMumentList);

router.get('/search', MusicController.getMusicListBySearch);
Copy link
Contributor

Choose a reason for hiding this comment

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

쿼리 파라미터 유무 검증 한번 해주면 좋을 것 같습니다!

const musicRegex = regex(keyword);

const musicList = await Music.find({
$or: [
Copy link
Contributor

Choose a reason for hiding this comment

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

or 연산자 써서 검색해준 거 좋아요~!

@@ -117,7 +117,7 @@ const getLikeMumentList = async (userId: string): Promise<UserMumentListResponse
feelingTag: mument.feelingTag,
content: mument.content,
isPrivate: mument.isPrivate,
likeCount: mument.likeCount,
likeCount: 0, //쓰이지 않음
Copy link
Contributor

Choose a reason for hiding this comment

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

likeCount는 디비 콜렉션 자체에 없지 않나요?
아예 삭제해줘도 될 것 같습니다!

@hujumee hujumee merged commit 35b72e6 into dev Jul 16, 2022
hujumee added a commit that referenced this pull request Mar 1, 2023
[FEAT] 곡 검색하기 구현, 보관함-좋아요 뮤멘트 추가사항  #14  #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants