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

[DPMBE-68] 유저 프로필 이미지 업로드 기능을 만든다 #89

Merged
merged 5 commits into from
Jun 16, 2023

Conversation

kdomo
Copy link
Member

@kdomo kdomo commented Jun 14, 2023

개요

작업사항

  • 유저 프로필 이미지 업로드 기능 추가 (presignedUrl 발급, 이미지 성공 확인 API)

변경로직

  • 기존 약속 관련 이미지만 받도록 Picture Entity 설계되어있어, pictureType 생성하였습니다. (PROMISE, USER)

@kdomo kdomo added enhancement New feature or request test test 코드 작성 labels Jun 14, 2023
@kdomo kdomo self-assigned this Jun 14, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

98.1% 98.1% Coverage
0.0% 0.0% Duplication

Copy link
Member

@ImNM ImNM left a comment

Choose a reason for hiding this comment

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

LGTM

추가적으로 업로드 url에
개발환경, 프로덕션 환경에 따른 구분이 되어있을까유?
버킷이 다른감

두둥은 버킷 하나에
prod/user/userid/~
dev/user/userid/~
이런식으로 구성하긴 했었어요!

@kdomo
Copy link
Member Author

kdomo commented Jun 15, 2023

버킷이 환경변수여서 버킷별로 구분하면 될거같아요!

Comment on lines +38 to +61
companion object {
fun createForPromise(userId: Long, promiseId: Long, url: String, uuid: String, pictureCommentType: PictureCommentType): Picture {
return Picture(
userId = userId,
promiseId = promiseId,
url = url,
uuid = uuid,
pictureType = PictureType.PROMISE,
pictureCommentType = pictureCommentType,
)
}

fun createForUser(userId: Long, url: String, uuid: String): Picture {
return Picture(
userId = userId,
promiseId = 0,
url = url,
uuid = uuid,
pictureType = PictureType.USER,
pictureCommentType = PictureCommentType.NONE,
)
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

동행객체로 따로 빼는군요 왜 그런건가요? 궁금

Copy link
Member Author

Choose a reason for hiding this comment

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

동행객체가 뭔가요?

Copy link
Collaborator

Choose a reason for hiding this comment

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

static 코틀린에서는 못만들어서 class 안에서 선언할 떄 저렇게 선언하는건데용
Picture 생성하는거 펙토리 메소드로 뺀거죠?

Copy link
Member Author

Choose a reason for hiding this comment

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

네네 맞습니다잇~!

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM~

Comment on lines +3 to +5
enum class PictureType {
PROMISE, USER
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

일단 인터랙션은 프론트에서 따로 하니까 미디어로 2가지로만 한거죠?

Copy link
Member Author

Choose a reason for hiding this comment

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

네넵

@kdomo kdomo merged commit 70c1e8e into develop Jun 16, 2023
@kdomo kdomo deleted the feature/DPMBE-68 branch June 16, 2023 08:57
kdomo added a commit that referenced this pull request Jun 16, 2023
* feat: 유저 프로필 presignedUrl 발급 기능 추가

* test: 유저 프로필 presignedUrl 발급 기능 테스트 코드 추가

* feat: 유저 프로필 업로드 성공 확인 기능 추가

* test: 유저 프로필 업로드 성공 확인 기능 테스트 코드 추가

* style: spotless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test test 코드 작성
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DPMBE-68] 유저 프로필 이미지 업로드 기능을 만든다
3 participants