Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#697 AWS-SDK V3으로 마이그레이션 #698

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

predict-woo
Copy link
Member

Summary

It closes #697

Images or Screenshots

Further Work

  • Do something...

@predict-woo predict-woo linked an issue Nov 28, 2023 that may be closed by this pull request
Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for taxi-dev-preview ready!

Name Link
🔨 Latest commit 2d6bc84
🔍 Latest deploy log https://app.netlify.com/sites/taxi-dev-preview/deploys/65f089dfa5e0f4000872472a
😎 Deploy Preview https://deploy-preview-698--taxi-dev-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@predict-woo predict-woo marked this pull request as ready for review November 28, 2023 14:19
Comment on lines 77 to 86
if (data.url) {
const res = await axiosOri({
url: data.url,
method: "put",
headers: {
"Content-Type": image.type,
},
data: image,
});
if (res.status === 200) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

흠.. 채팅 사진 업로드는 코드 수정이 없어도 되나요?? @predict-woo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@14KGun 헉 맞는 말이에요 수정하겠습니다

@14KGun 14KGun marked this pull request as draft January 10, 2024 09:12
@predict-woo predict-woo marked this pull request as ready for review January 23, 2024 13:38
@14KGun
Copy link
Member

14KGun commented Jan 27, 2024

@predict-woo conflict 가 있어요!

@predict-woo
Copy link
Member Author

@14KGun 수정했습니다!

Comment on lines 46 to 56
const { url, fields, id } = await axios({
const { url, id } = await axios({
url: "chats/uploadChatImg/getPUrl",
method: "post",
data: { roomId, type: file.type },
});
if (!url || !fields || !id) throw new Error();
if (!url || !id) throw new Error();

const { status: s3Status } = await axiosOri({
url,
method: "put",
data: file,
headers: { "Content-Type": file.type },
});

const formData = new FormData();
for (const key in fields) formData.append(key, fields[key]);
formData.append("file", file);
const { status: s3Status } = await axiosOri.post(url, formData);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@predict-woo @cokia #323 이거 채팅 이미지 업로드가 되지 않는데, 에서 채팅 이미지 업로드 쪽 코드 수정은 아직 되지 않은 것 같긴 합니다??

@14KGun 14KGun changed the title AWS-SDK V3으로 마이그레이션 #697 AWS-SDK V3으로 마이그레이션 Feb 9, 2024
@14KGun 14KGun marked this pull request as draft February 13, 2024 13:43
@xMHW xMHW force-pushed the #697-aws-sdk-v3-migration branch from 25a4201 to 2d6bc84 Compare March 12, 2024 16:59
@xMHW xMHW self-assigned this Mar 12, 2024
@xMHW xMHW marked this pull request as ready for review March 12, 2024 17:00
@xMHW
Copy link

xMHW commented Mar 12, 2024

Axios는 기본적으로 2xx 상태체크를 하고, 에러가 나는 경우 AxiosError 객체를 Throw합니다. 따라서, 필요없는 상태 체크 코드들을 제거 했습니다.
추가로, useAxios 훅으로 사용하고 있는 코드에서, 역시 else if (res.status != 200) 을 체크하고 있는데, 이부분도 불필요하여 제거합니다.
혹시, 특별한 이유로 200이 아니지만 2xx의 코드의 경우 캐치해야하는 이유가 있다면 알려주시면 좋을 것 같습니다.
@predict-woo

@xMHW xMHW requested a review from ybmin March 19, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS-SDK V3으로 마이그레이션
3 participants