diff --git a/.env.development b/.env.development index 48008352..30217703 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,5 @@ # Custom Environment Variables (Must be named with VITE_ prefix) -## Development Environment Address Prefix (usually '/' or './') TODO: VITE_API_UPLOADS_URL = `http://127.0.0.1:10007/uploads` VITE_API_BASE_URL = `http://127.0.0.1:10007/api` diff --git a/src/hooks/useBackgroundPicture.ts b/src/hooks/useBackgroundPicture.ts index 79d6c582..cc084bf6 100644 --- a/src/hooks/useBackgroundPicture.ts +++ b/src/hooks/useBackgroundPicture.ts @@ -10,8 +10,8 @@ const { showKUNGalgameBackground, showKUNGalgameCustomBackground } = // Fetch background image data from the backend const fetchGetBackground = async (imageName: string): Promise => { - const baseUrl = import.meta.env.VITE_API_BASE_URL - const url = `/uploads/image/bg/${imageName}.webp` + const baseUrl = import.meta.env.VITE_API_UPLOADS_URL + const url = `/image/bg/${imageName}.webp` const fullUrl = `${baseUrl}${url}` const response = await fetch(fullUrl, { method: 'GET',