From d7107a1e0cb50427d85a920d07bf73015dbca78b Mon Sep 17 00:00:00 2001 From: Satsuki Akiba Date: Thu, 5 Jun 2025 06:28:24 +0900 Subject: [PATCH] refactor: use relative paths for API calls --- frontend/src/components/EpisodePlayer.tsx | 4 +--- frontend/src/components/FeedList.tsx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/EpisodePlayer.tsx b/frontend/src/components/EpisodePlayer.tsx index 02bfceb..c5725b8 100644 --- a/frontend/src/components/EpisodePlayer.tsx +++ b/frontend/src/components/EpisodePlayer.tsx @@ -21,9 +21,7 @@ export default function EpisodePlayer() { const fetchEpisodes = async () => { try { - const response = await fetch( - `${import.meta.env["PODCAST_BASE_URL"]}/api/episodes`, - ); + const response = await fetch("/api/episodes"); if (!response.ok) { throw new Error("エピソードの取得に失敗しました"); } diff --git a/frontend/src/components/FeedList.tsx b/frontend/src/components/FeedList.tsx index cebdc58..af8751e 100644 --- a/frontend/src/components/FeedList.tsx +++ b/frontend/src/components/FeedList.tsx @@ -19,9 +19,7 @@ export default function FeedList() { const fetchFeeds = async () => { try { - const response = await fetch( - `${import.meta.env["PODCAST_BASE_URL"]}/api/feeds`, - ); + const response = await fetch("/api/feeds"); if (!response.ok) { throw new Error("フィードの取得に失敗しました"); }