Skip to content
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

Merged
merged 3 commits into from
Nov 3, 2024
Merged

Conversation

j-nary
Copy link
Member

@j-nary j-nary commented Oct 30, 2024

🚩 관련 이슈

📋 작업 내용

  • DELETE
  • POST
  • PUT

📌 PR Point

  • 정상 작동 확인했습니다!

📸 스크린샷

DELETE

image

POST like

image

PUT

image

@j-nary j-nary self-assigned this Oct 30, 2024
Copy link

height bot commented Oct 30, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@@ -77,7 +77,7 @@ export const useMutationPostLike = (queryId: string) => {

return useMutation({
mutationKey: ['getPost', queryId],
mutationFn: () => postLike(queryId),
mutationFn: () => postLike(+queryId),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서 queryId 앞에 있는 +는 무엇일까요?!

Copy link
Member Author

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),
Copy link
Contributor

@borimong borimong Nov 2, 2024

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 로 수정된 것 같은데, 혹시 의도된 것일까요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 v2로 마이그레이션된 것과 형태를 맞추기 위해 의도하였습니다!

@j-nary j-nary merged commit 645ed00 into develop Nov 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

post/v2 API 마이그레이션
2 participants