-
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
구현 - 상영중인 영화 리뷰 리스트 API 라우트 추가 #27
Conversation
Quality Gate passedIssues Measures |
[], | ||
); | ||
|
||
res.status(200).send({ page: Number(page), results: nowPlayingMovieReviews }); |
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.
try 안에 있는 내용을 안에 고차함수로 넣고 메서드, 스키마를 넣으면 405, 422, 500 에러를 공통으로 처리하면 좋을 것 같습니다.
const querySchema = z.object({
page: z.string(),
query: z.number(),
region: z.string()
});
type Query = z.infer<typeof querySchema>;
withCommonHandler(() => {
}, HTTPMethod.GET, querySchema)
{ language, region, page }: NowPlayingMovieListReviewsParams = { language: "ko-KR", region: "KR", page: 1 }, | ||
) => { | ||
return useQuery({ | ||
queryKey: [...reviewsQueryKeys.nowPlayingMovieList({ language, region, page })], |
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.
queryKey: [...reviewsQueryKeys.nowPlayingMovieList({ language, region, page })], | |
queryKey: reviewsQueryKeys.nowPlayingMovieList({ language, region, page }), |
import { ReviewAuthorModel } from "./review-author"; | ||
|
||
export class NowPlayingMovieReviewModel { | ||
movieId: number; |
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.
tsdoc 달아두면 나중에 IDE에 도움을 받을 수 있어서 편리합니다.
PR 타입
연관 이슈
resolve #25
개요
현재 상영중인 영화 리뷰 API 추가
변경 사항
react-query
추가리뷰시 참고할 사항