-
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
[7주차] 기본 과제 제출 #8
base: main
Are you sure you want to change the base?
Conversation
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 contentDTO:searchContentDTO = req.query as any; | ||
//~ const { keyword, option, page, limit } = req.query; |
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.
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.
오 쿼리로 배열을 받을 수 있는지 몰랐는데 저런식으로 받을 수가 있군요...! 역시 다현쓰 최고입니당
//! option = ['배우1', '배우2'] 같은 경우 | ||
const contentList = await prisma.product.findMany({ | ||
where: { | ||
title: { | ||
contains: searchDTO.keyword | ||
}, | ||
actor: { | ||
hasSome: searchDTO.option, |
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.
오호 배우를 받아와서 페이징처리 조건으로 설정해줬군요 ! 역시 넘잘해영
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.
최고오옹
}, | ||
actor: { | ||
hasSome: searchDTO.option, |
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.
배우를 포함하는 경우만 find 하도록 필터링 해준건가요 ?? In과의 차이가 있을까요?!
SERVER PR
🐕 과제 구현 명세
: 제목에 keyword 포함되고 option의 배우들 이름 포함된 작품을 paging 해서 줌
-> [GET] /content/search?keyword=제목키워드&option=배우1&option=배우2&page=1&limit=2
-> [POST] /content : content와 이미지 함께 등록
-> [POST] /image : 존재하는 작품에 이미지만 등록(작품의 아이디는 body로 받기)
🐥 이런 점이 새로웠어요 / 어려웠어요