Skip to content

Commit

Permalink
[fix] sharedLink 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
subsub-e committed Aug 20, 2024
1 parent ad13136 commit b4b6adb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions service/src/api/comment/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@ const postLike = commentId => {
};

const getEachComment = commentId => {
return get(`/comments/commentId/${commentId}`);
return get(`/comments/commentId?id=${commentId}`);
};

const getShortenLink = () => {
return get(`/shorten-url`);
};

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: {
Expand All @@ -37,7 +36,7 @@ const getRedirectLink = async commentId => {
credentials: 'include',
},
);

console.log('ddd');
// 응답의 헤더에서 Location 값을 추출
const redirectUrl = response.headers.get('Location');
return redirectUrl;
Expand Down

0 comments on commit b4b6adb

Please sign in to comment.