From b4b6adb41363b4ec9d5914492e3747a70a96a911 Mon Sep 17 00:00:00 2001 From: subsub-e Date: Tue, 20 Aug 2024 11:48:01 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20sharedLink=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/src/api/comment/index.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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;