diff --git a/components/FollowButton/FollowClient.tsx b/components/FollowButton/FollowClient.tsx index 73f0420..a539b6d 100644 --- a/components/FollowButton/FollowClient.tsx +++ b/components/FollowButton/FollowClient.tsx @@ -16,7 +16,7 @@ export default function FollowClient({ targetUserId, isFollowing }: Props) { const follow = async () => { setIsFetching(true); - const res = await fetch('/api/follow', { + const res = await fetch('../api/follow', { method: 'POST', body: JSON.stringify({ targetUserId }), headers: { @@ -43,7 +43,7 @@ export default function FollowClient({ targetUserId, isFollowing }: Props) { const unfollow = async () => { setIsFetching(true); - const res = await fetch(`/api/follow?targetUserId=${targetUserId}`, { + const res = await fetch(`../api/follow?targetUserId=${targetUserId}`, { method: 'DELETE', }); @@ -67,4 +67,4 @@ export default function FollowClient({ targetUserId, isFollowing }: Props) { } -} \ No newline at end of file +}