-
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
DELETE, POST, PUT post/v2 API 마이그레이션 #943
Conversation
|
@@ -77,7 +77,7 @@ export const useMutationPostLike = (queryId: string) => { | |||
|
|||
return useMutation({ | |||
mutationKey: ['getPost', queryId], | |||
mutationFn: () => postLike(queryId), | |||
mutationFn: () => postLike(+queryId), |
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.
여기서 queryId 앞에 있는 +는 무엇일까요?!
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.
혹시 string 형식으로 들어와도 숫자 형식으로 인자 전달해주게끔 명시적으로 작성해둔 것입니다!
@@ -30,7 +30,7 @@ export const useMutationUpdateLike = (take: number, meetingId?: number) => { | |||
const queryClient = useQueryClient(); | |||
|
|||
return useMutation({ | |||
mutationFn: (postId: number) => postLike(String(postId)), | |||
mutationFn: (postId: number) => postLike(postId), |
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.
이 코드를 보니까, postId 를 number 타입으로 받아오고 있고, postLike 에서 기존에 있던 String() 을 제거해주셨는데요! postLike 의 인자 타입이 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.
이전 v2로 마이그레이션된 것과 형태를 맞추기 위해 의도하였습니다!
🚩 관련 이슈
📋 작업 내용
📌 PR Point
📸 스크린샷
DELETE
POST like
PUT