-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: pr 리뷰 요청 글 전체 조회 api 단 구현 #43
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
base: main
Are you sure you want to change the base?
Conversation
seobbang
left a comment
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.
깔꼼하네요 ~ ~ 👍
|
|
||
| export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> { | ||
| return apiClient.get<QueryPrReviewsResponse>("api/v1/pr-reviews", { | ||
| searchParams: params as Record<string, string | 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.
요기 단언 들어가야하는거 되게 특이하네요,,, 그럼 searchParams 넘겨줄 때마다 단언이 필요하다니
| searchParams: params as Record<string, string | number>, | |
| searchParams: {...params} |
object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..
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.
Suggested change
searchParams: params as Record<string, string | number>, searchParams: {...params} object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..
호오 리터럴로 추론하는 방법 좋은데요?!
| isLast: boolean; | ||
| } | ||
|
|
||
| export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> { |
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.
요기 반환 타입 명시 빼줘도 괜찮을 것 같아요-!
| import { prListQueryKeys } from "./querykeys"; | ||
|
|
||
| export const useQueryPrReviews = (params?: QueryPrReviewsQueryParams) => { | ||
| return useQuery<ApiResponse<QueryPrReviewsResponse>, Error>({ |
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 useQuery<ApiResponse<QueryPrReviewsResponse>, Error>({ | |
| return useQuery({ |
요기도 추론돼서 없어도 괜찮을 것 같아욤
jungwoo3490
left a comment
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.
굿입니다요!!👍🏻👍🏻
|
|
||
| export async function queryPrReviews(params?: QueryPrReviewsQueryParams): Promise<ApiResponse<QueryPrReviewsResponse>> { | ||
| return apiClient.get<QueryPrReviewsResponse>("api/v1/pr-reviews", { | ||
| searchParams: params as Record<string, string | 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.
Suggested change
searchParams: params as Record<string, string | number>, searchParams: {...params} object literal로 추론하게 요런 방법도 있네요 ㅎㅎㅎ..
호오 리터럴로 추론하는 방법 좋은데요?!
| status: string; | ||
| /** 분야 태그 */ | ||
| position: string; |
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.
요기 QueryPrReviewsQueryParams로 넘길 수 있는 값이랑 같으면 타입 좁혀줘도 좋을 것 같아요~!
close #22
☑️ 완료 태스크
🔎 PR 내용
공통 사용 부분인 PR 리뷰 요청 글 전체 조회 (
QueryPrReviews) api 단 구현한 PR 먼저 main에 반영합니다> PR 리뷰 요청 글 전체 조회 API 명세
api hook 사용부 example
📷 스크린샷
2025-11-28.00.34.05.mov