diff --git a/src/app/mocks/handler/like.ts b/src/app/mocks/handler/like.ts index a75b0f6..812a999 100644 --- a/src/app/mocks/handler/like.ts +++ b/src/app/mocks/handler/like.ts @@ -22,7 +22,7 @@ export const likeHandlers = [ }), // 2️⃣ 피드 좋아요 - http.post('/feeds/:feed_id/likes', ({ params }) => { + http.put('/feeds/:feed_id/likes', ({ params }) => { const { feed_id } = params; if (isNaN(Number(feed_id))) { diff --git a/src/app/mocks/test/like.error.test.ts b/src/app/mocks/test/like.error.test.ts index d3b029c..508e9fe 100644 --- a/src/app/mocks/test/like.error.test.ts +++ b/src/app/mocks/test/like.error.test.ts @@ -3,7 +3,7 @@ import axios from 'axios'; const testCases = [ ['GET', '피드 좋아요 조회 API'], - ['POST', '피드 좋아요 API'], + ['PUT', '피드 좋아요 API'], ['DELETE', '피드 좋아요 취소 API'], ]; diff --git a/src/app/mocks/test/like.test.ts b/src/app/mocks/test/like.test.ts index 3a03b39..9fc61a6 100644 --- a/src/app/mocks/test/like.test.ts +++ b/src/app/mocks/test/like.test.ts @@ -15,7 +15,7 @@ describe('좋아요가 되어있지 않은 상태에서', () => { const { totalCount: prevTotalCount } = await getFeedById(feedId); // 좋아요 클릭 - await axios.post(`/feeds/${feedId}/likes`); + await axios.put(`/feeds/${feedId}/likes`); // 업데이트 된 좋아요의 상태 const { totalCount, isLike } = await getFeedById(feedId); @@ -44,7 +44,7 @@ describe('좋아요가 되어있는 상태에서', () => { const { totalCount: prevTotalCount, isLike: prevIsLike } = await getFeedById(feedId); - await axios.post(`/feeds/${feedId}/likes`); + await axios.put(`/feeds/${feedId}/likes`); const { totalCount, isLike } = await getFeedById(feedId);