Skip to content

Conversation

@ozzing
Copy link
Collaborator

@ozzing ozzing commented Apr 12, 2023

📝 PR Summary

기존 이미지 업로드 API들을 pre-signed 방식으로 변경했습니다.

미션 생성하기

  • v1 때도 사용하지 않았던 API라 그냥 바로 수정했습니다.

스탬프 등록하기, 스탬프 수정하기

  • 앱팀 클라이언트는 스프린트1 내에 작업하지 않을 예정입니다.
  • 따라서 엔드포인트를 다르게 해서 기존 버전과 pre-signed 버전이 공존합니다!
  • 클라이언트 작업 이후 제거할 예정입니다.

🌵 Working Branch

refactor/presigned

🌴 Works

  • 스탬프 presigned
  • 미션 presigned
  • 스탬프 등록하기
  • 스탬프 수정하기
  • 미션 생성하기

🌱 Related Issue

#57

@ozzing ozzing added ✨ Feat 새로운 피쳐 생성 🔨 Refactor 코드 개선 labels Apr 12, 2023
@ozzing ozzing self-assigned this Apr 12, 2023
Copy link
Member

@dragontaek-lee dragontaek-lee left a comment

Choose a reason for hiding this comment

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

개인적으로 pre-signed방식으로 변경한 것은 좋은 선택인것 같아요!
서버 부담도 적어지고 처리 속도도 개선되겠네요..!
혹시 체감될정도로 빨라졌나요!? 단순한 궁금증입니닷!

//스탬프 중복 검사체크
@Transactional(readOnly = true)
public boolean checkDuplicateStamp(Long userId, Long missionId) {
public void checkDuplicateStamp(Long userId, Long missionId) {
Copy link
Member

Choose a reason for hiding this comment

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

되게 사소하지만 이러면 더 깔끔할거 같은 느낌!

public void checkDuplicateStamp(Long userId, Long missionId) {
    if (stampRepository.existsByUserIdAndMissionId(userId, missionId)) {
        throw new BadRequestException(ResponseCode.INVALID_REQUEST);
    }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 저도 이부분 개선하고 싶었는데 감사합니다!
포스트맨 테스트에서는 577ms -> 81ms로 체감이 될 정도로 빨라지긴 했습니다..!

@ozzing ozzing merged commit c099479 into dev Apr 13, 2023
@ozzing ozzing deleted the refactor/presigned branch April 13, 2023 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 피쳐 생성 🔨 Refactor 코드 개선 size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants