diff --git a/service/src/api/comment/index.jsx b/service/src/api/comment/index.jsx index 5554ed4..0ad7fcc 100644 --- a/service/src/api/comment/index.jsx +++ b/service/src/api/comment/index.jsx @@ -13,7 +13,7 @@ const postLike = commentId => { }; const getEachComment = commentId => { - return get(`/comments/commentId/${commentId}`); + return get(`/comments/commentId?id=${commentId}`); }; const getShortenLink = () => { @@ -21,11 +21,10 @@ const getShortenLink = () => { }; const getRedirectLink = async commentId => { - const accessToken = localStorage.getItem('userInfo'); - + console.log('dddd'); try { const response = await fetch( - `https://hyundai-server.store/redirect/${commentId}`, + `${import.meta.env.VITE_API_URL}/redirect/${commentId}`, { method: 'GET', headers: { @@ -37,7 +36,7 @@ const getRedirectLink = async commentId => { credentials: 'include', }, ); - + console.log('ddd'); // 응답의 헤더에서 Location 값을 추출 const redirectUrl = response.headers.get('Location'); return redirectUrl;