From 5f2b9261bd224d24937972fcf28ec7c9cba61231 Mon Sep 17 00:00:00 2001 From: anjaemin Date: Fri, 4 Nov 2022 18:46:23 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20api=20url=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 ++- src/pages/api/index.tsx | 2 +- src/pages/delete/index.tsx | 2 +- src/pages/download/index.tsx | 2 +- src/pages/filelist/index.tsx | 2 +- src/pages/main/index.tsx | 2 +- src/pages/postApi/index.tsx | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 847693e..1952fa5 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -PUBLIC_URL=/tempfiles-frontend \ No newline at end of file +PUBLIC_URL=/tempfiles-frontend +BACKEND_BASEURL= https://tfb.minpeter.cf \ No newline at end of file diff --git a/src/pages/api/index.tsx b/src/pages/api/index.tsx index 2dbe97d..8d0c1d8 100644 --- a/src/pages/api/index.tsx +++ b/src/pages/api/index.tsx @@ -13,7 +13,7 @@ export const ApiPage: React.FC = () => { const getApiInfo = async () => { await axios({ method: 'get', - url: 'https://tfb.minpeter.cf/info', + url: `${process.env.BACKEND_BASEURL}/info`, }) .then((res) => { setApiInfo(res.data); diff --git a/src/pages/delete/index.tsx b/src/pages/delete/index.tsx index c64c256..5116824 100644 --- a/src/pages/delete/index.tsx +++ b/src/pages/delete/index.tsx @@ -20,7 +20,7 @@ export const DeletePage: React.FC = () => { const deleteFile = async () => { await axios({ method: 'delete', - url: `https://tfb.minpeter.cf/del/${DeleteFileName}`, + url: `${process.env.BACKEND_BASEURL}/del/${DeleteFileName}`, }) .then((res) => { console.log(res); diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx index f18640d..ed6d5b7 100644 --- a/src/pages/download/index.tsx +++ b/src/pages/download/index.tsx @@ -29,7 +29,7 @@ export const DownloadPage: React.FC = () => { {year}-{month}-{day} - +