refactor: use relative paths for API calls
This commit is contained in:
		@@ -21,9 +21,7 @@ export default function EpisodePlayer() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const fetchEpisodes = async () => {
 | 
					  const fetchEpisodes = async () => {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      const response = await fetch(
 | 
					      const response = await fetch("/api/episodes");
 | 
				
			||||||
        `${import.meta.env["PODCAST_BASE_URL"]}/api/episodes`,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
      if (!response.ok) {
 | 
					      if (!response.ok) {
 | 
				
			||||||
        throw new Error("エピソードの取得に失敗しました");
 | 
					        throw new Error("エピソードの取得に失敗しました");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,9 +19,7 @@ export default function FeedList() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const fetchFeeds = async () => {
 | 
					  const fetchFeeds = async () => {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      const response = await fetch(
 | 
					      const response = await fetch("/api/feeds");
 | 
				
			||||||
        `${import.meta.env["PODCAST_BASE_URL"]}/api/feeds`,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
      if (!response.ok) {
 | 
					      if (!response.ok) {
 | 
				
			||||||
        throw new Error("フィードの取得に失敗しました");
 | 
					        throw new Error("フィードの取得に失敗しました");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user