Skip to content

Commit

Permalink
Merge pull request #77 from tempfiles-Team/74-백엔드-filename-제거로-인한-오류-발생
Browse files Browse the repository at this point in the history
74 백엔드 filename 제거로 인한 오류 발생
  • Loading branch information
ananjaemin committed Nov 15, 2022
2 parents f389861 + eedc3e5 commit ea53cd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/pages/checkpw/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ export const CheckPasswordPage: React.FC = () => {
} else {
await axios({
method: 'get',
url: `${process.env.REACT_APP_BACKEND_BASEURL}/checkpw/${checkPasswordFileProps.fileId}/${checkPasswordFileProps.filename}?pw=${password}`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/checkpw/${checkPasswordFileProps.fileId}?pw=${password}`,
})
.then((res) => {
SetDownloadFileProps({
filename: checkPasswordFileProps.filename,
fileId: checkPasswordFileProps.fileId,
isEncrypted: checkPasswordFileProps.isEncrypted,
token: res.data.token,
Expand Down
8 changes: 4 additions & 4 deletions src/pages/download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const DownloadPage: React.FC = () => {
const getFileProps = async () => {
await axios({
method: 'get',
url: `${process.env.REACT_APP_BACKEND_BASEURL}/file/${downloadFileProps.fileId}/${
downloadFileProps.filename
}${downloadFileProps.isEncrypted ? `?token=${downloadFileProps.token}` : ''}`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/file/${downloadFileProps.fileId}${
downloadFileProps.isEncrypted ? `?token=${downloadFileProps.token}` : ''
}`,
})
.then((res) => {
setFileProps({
Expand All @@ -57,7 +57,7 @@ export const DownloadPage: React.FC = () => {
console.log(err);
});
};
if (downloadFileProps.filename != null || downloadFileProps.fileId != null) {
if (downloadFileProps.fileId != null) {
getFileProps();
} else {
navigate('/');
Expand Down
1 change: 0 additions & 1 deletion src/state/reducers/DownloadFileProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Action } from '../actions';

const reducer = (
state: any = {
filename: null,
fileId: null,
token: null,
isEncrypted: null,
Expand Down

0 comments on commit ea53cd1

Please sign in to comment.