Skip to content

Commit

Permalink
Merge pull request #32 from ananjaemin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ananjaemin committed Nov 4, 2022
2 parents 84038ce + 6b07a07 commit b0ffe33
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PUBLIC_URL=/tempfiles-frontend
PUBLIC_URL=/tempfiles-frontend
BACKEND_BASEURL= https://tfb.minpeter.cf
2 changes: 1 addition & 1 deletion src/pages/api/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/delete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const DownloadPage: React.FC = () => {
{year}-{month}-{day}
</S.DonwloadFileBox>
<S.DownloadPageButtonSection>
<a href={`https://tfb.minpeter.cf/dl/${downloadFileProps.Name}`}>
<a href={`${process.env.BACKEND_BASEURL}/dl/${downloadFileProps.Name}`}>
<Button click={() => {}} bgColor="var(--color-button-primary)" label="다운로드" />
</a>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/pages/filelist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const FileListPage: React.FC = () => {
const getFileList = async () => {
await axios({
method: 'get',
url: 'https://tfb.minpeter.cf/list',
url: `${process.env.BACKEND_BASEURL}/list`,
})
.then((res) => {
setFileList(res.data.list); //파일리스트 요소 갯수에 따른 핸들링 추가예정
Expand Down
2 changes: 1 addition & 1 deletion src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const MainPage: React.FC = () => {
formdata.append('file', fileProps.fileData);
await axios({
method: 'post',
url: `https://tfb.minpeter.cf/upload${
url: `${process.env.BACKEND_BASEURL}/upload${
passwordBoolean && password != '' && password != undefined ? `?pw=${password}` : ''
}`,
data: formdata,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/postApi/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ApiPostPage: React.FC = () => {
const getUrlApiInfo = async () => {
await axios({
method: 'get',
url: `https://tfb.minpeter.cf/info?api=${urlApi}`,
url: `${process.env.BACKEND_BASEURL}/info?api=${urlApi}`,
})
.then((res) => {
if (res.data?.message === 'invalid api name') {
Expand Down

0 comments on commit b0ffe33

Please sign in to comment.