Skip to content

Commit

Permalink
Merge pull request #134 from softeerbootcamp4th/feat/#125/RewardApi
Browse files Browse the repository at this point in the history
[fix] sharedLink 로직 수정
  • Loading branch information
subsub-e authored Aug 20, 2024
2 parents 4fcae89 + b4b6adb commit d729d1a
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 d729d1a

Please sign in to comment.