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

Presigned URL 관련 예외처리 #158

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

msjang4
Copy link
Collaborator

@msjang4 msjang4 commented Nov 30, 2023

resolved: #157

작업 내용

  • Get Presigned URL 생성 전 오브젝트 존재여부 예외처리
  • 프로필 이미지 확장자 Optional 로 변경 및 profileExtension에서 profileImageExtension으로 명칭 통일
  • 프로필 변경 및 회원가입 시 프로필 이미지 업로드 여부 예외처리

@msjang4 msjang4 added backend feat 새로운 기능 추가 labels Nov 30, 2023
@msjang4 msjang4 added this to the Week 4 milestone Nov 30, 2023
@msjang4 msjang4 requested a review from 5tarry November 30, 2023 07:22
@msjang4 msjang4 self-assigned this Nov 30, 2023
Copy link
Collaborator

@5tarry 5tarry left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Comment on lines +73 to +80
const result = await this.UserModel.findOneAndUpdate(
{ uuid },
updateOption,
{
lean: true,
new: true,
},
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +89 to +93
return {
nickname: result.nickname,
statusMessage: result.statusMessage,
profileImageUrl,
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

findOneAndObject에서 처음부터 선별한 field만 가져오는건 어떻게 생각하시나요?!

Comment on lines +37 to +52
.then((element) => {
const contents = element.ListBucketResult.Contents;
if (Array.isArray(contents)) {
return _.map(contents, 'Key._text');
}
if (contents) {
// eslint-disable-next-line no-underscore-dangle
return [contents.Key._text];
}
return [];
});
};
export const checkUpload = async (bucketName: string, objectName: string) => {
const objectList = await listObjects(bucketName, { prefix: objectName });

return objectList.includes(objectName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

꼼꼼하네요! 👍

@5tarry 5tarry merged commit 041e801 into develop Nov 30, 2023
@msjang4 msjang4 deleted the feat/exception_handle_presigned_url branch December 11, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend feat 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend] Presigned URL 예외처리
2 participants