Skip to content

Conversation

@hyerinhwang-sailin
Copy link
Collaborator

@hyerinhwang-sailin hyerinhwang-sailin commented Apr 10, 2025

Related issue 🛠

Work Description ✏️

  1. 요청 DTO 구조 개선
  • RegisterStampRequest, EditStampRequest의 공통 필드 추출 → BaseStampRequest 상속 구조로 리팩토링
    389b8b6
  1. 유효성 검사 책임 분리
  • 기존 StampService.validateStampInfo() 삭제
  • 엔티티 내 Stamp.validate() 메서드로 유효성 검사 책임 이동
    ddfc31f
  1. 권한 체크 로직 추가
  • 기존에 스탬프 삭제 시 유저 본인의 스탬프인지 검증하지 않고 삭제가 이루어졌음

  • 스탬프 삭제 시 userId vs stamp.userId 비교하여 권한 검증 추가

    • 권한 없을 경우 ForbiddenException + STAMP_DELETE_FORBIDDEN 에러코드 반환
      0f7590e
  • 이에 맞춰 SoptampFacadeTest도 수정했습니다
    2cf79b9

  1. 서비스 계층 의존성 정리
  • StampController에서 stampService 직접 호출 제거
    • 모든 비즈니스 로직은 SoptampFacade 통해 위임
  • editStamp() 또한 Facade에서 수정 처리 로직 담당
    7599949

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

To Reviewers 📢

스탬프 삭제 권한 미체크를 제외하면 솝탬프 로직 상 문제는 보이지 않아서 리팩토링 위주로 작업이 이루어졌습니다!

@hyerinhwang-sailin hyerinhwang-sailin linked an issue Apr 10, 2025 that may be closed by this pull request
1 task
@height
Copy link

height bot commented Apr 10, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@hyerinhwang-sailin hyerinhwang-sailin merged commit c3ed791 into dev Apr 10, 2025
1 check 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.

[REFACTOR] 솝탬프 관련 로직 리팩토링

1 participant