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

feature: 상품입양 후기 작성 api #127

Merged
merged 19 commits into from
May 3, 2024

Conversation

Combi153
Copy link
Contributor

@Combi153 Combi153 commented Apr 21, 2024

📌 관련 이슈

📁 작업 설명

  • 상품 입양 후기를 작성하는 api를 개발했습니다.

📸 작업화면

image

설명

  • s3에 이미지를 업로드 할 수 있도록 aws sdk를 활용했습니다.
  • s3에 이미지를 업로드하는 요청을 트랜잭션에서 제외하기 위해 Facade 패턴을 활용했습니다.
  • 이미지 업로드는 여러 api 에서 활용할 수 있을 것 같아 따로 Image 패키지와 ImageStorageService를 만들어 관리하고자 했습니다.

Copy link
Contributor

@hgo641 hgo641 left a comment

Choose a reason for hiding this comment

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

👍👍 꼼꼼한 코드 최고에요

Copy link
Member

@TaeyeonRoyce TaeyeonRoyce left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
코드가 깔끔하네요..!

몇가지 코멘트 남겼습니다!

Comment on lines 28 to 29
val pathIndex = storedUrl.indexOf("/$path")
return "$domain${storedUrl.substring(pathIndex)}"
Copy link
Member

Choose a reason for hiding this comment

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

이미지 경로에 대한 조작이 여러번 발생하는데, 주석으로 예시를 들어주실 수 있나요?
storedUrl -> pathIndex -> $domain + ${storedUrl에서 자른 문자열} 과정

-> https://s3.amazonaws.com/my-imgae/myfolder/image.png
-> 도메인이 끝나는 지점의 인덱스 (com)
-> domain + /my-imgae/myfolder/image.png
=> petqua.com/my-imgae/myfolder/image.png
이런과정이죠?

아니면 이미지경로를 만드는 역할을 분리해도 좋아보입니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

주석으로 예시를 달아두었습니다! 그리고 이미지 경로를 변환하는 책임을 지는 객체를 하나 추가해두었습니다.

예시는 말씀하신 바와 정확히 일치합니다!

src/main/kotlin/com/petqua/domain/image/ImageType.kt Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Apr 26, 2024

Test Results

 64 files  + 5   64 suites  +5   28s ⏱️ +6s
306 tests +23  306 ✅ +23  0 💤 ±0  0 ❌ ±0 
426 runs  +34  426 ✅ +34  0 💤 ±0  0 ❌ ±0 

Results for commit 085c182. ± Comparison against base commit 1390f7f.

♻️ This comment has been updated with latest results.

@Combi153 Combi153 force-pushed the 125-feature-상품입양-후기-작성 branch from ec0b55b to 085c182 Compare April 29, 2024 06:32
Copy link
Contributor

@hgo641 hgo641 left a comment

Choose a reason for hiding this comment

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

시험기간에도 고생많으십니다......!!! 어프루브 🌈🚀

Copy link
Member

@TaeyeonRoyce TaeyeonRoyce left a comment

Choose a reason for hiding this comment

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

의견 남겨주신 부분들과 리뷰 반영도 확인했습니다!
고생 많으셨어요~!👍👍

@Combi153 Combi153 self-assigned this May 2, 2024
@Combi153 Combi153 merged commit 35f447a into develop May 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: 상품(입양) 후기 작성
3 participants