-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
- Controller, Service, DTO 구현 - Router 추가
- 좋아요한 유저와 음악의 _id 필드 추가 - DTO에 필요한 필드 추가 -
There was a problem hiding this 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({ |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log 는 테스트 완료 후 삭제하고 push해줍시다!
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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: [ |
There was a problem hiding this comment.
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, //쓰이지 않음 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likeCount는 디비 콜렉션 자체에 없지 않나요?
아예 삭제해줘도 될 것 같습니다!
💿 DESCRIPTION
곡 검색하기 : 곡 검색창에 입력한 keyword가 곡 제목/아티스트 명에 포함된 음악들의 리스트 가져오기 [FEAT] 곡 검색하기 #15
보관함-좋아요 뮤멘트 [FEAT] 보관함 좋아요한 뮤멘트 리스트 조회, 필터링 #14 :
🎙 RELATED ISSUE
#14 #15
💃 REVIEW POINT