-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
const result = await this.UserModel.findOneAndUpdate( | ||
{ uuid }, | ||
updateOption, | ||
{ | ||
lean: true, | ||
new: true, | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
return { | ||
nickname: result.nickname, | ||
statusMessage: result.statusMessage, | ||
profileImageUrl, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findOneAndObject에서 처음부터 선별한 field만 가져오는건 어떻게 생각하시나요?!
.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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
꼼꼼하네요! 👍
resolved: #157
작업 내용