Skip to content

[Refactor] 여행 기록 수정 시 삭제된 커스텀 스티커 유지 처리 - #230

Merged
yeonie0309 merged 2 commits into
developfrom
refactor/224-travel-record-deleted-sticker-update
Aug 5, 2026
Merged

[Refactor] 여행 기록 수정 시 삭제된 커스텀 스티커 유지 처리#230
yeonie0309 merged 2 commits into
developfrom
refactor/224-travel-record-deleted-sticker-update

Conversation

@yeonie0309

Copy link
Copy Markdown
Collaborator

📌 PR 설명

  • 여행 기록 수정 API에서 삭제된 커스텀 스티커가 기존에 해당 기록에 배치되어 있으면 유지할 수 있도록 수정
  • 삭제된 커스텀 스티커를 새로 추가하거나 다른 기록에서 사용하는 경우는 기존처럼 거부
  • 스티커 요청 검증 이후 기존 배치 스티커를 삭제하도록 처리 순서 조정

🔗 연관된 이슈

Resolves: #224

📝 리뷰 요구사항

  • 삭제된 커스텀 스티커 유지 허용 범위가 “해당 여행기록에 기존 배치된 스티커”로 제한되는지 확인 부탁드립니다.
  • 스티커 생략/null, 빈 배열, 값 전달 시 동작 정책이 의도와 맞는지 확인 부탁드립니다.

💻 테스트 결과

  • API 테스트 완료
  • 정상 동작 확인

수정 전 여행기록 상세 조회 (스티커 id: 100)

image

논리 삭제된 커스텀 스티커가 기존에 배치된 여행기록 수정 요청 시 COMMON200 응답 확인

image

수정 후 상세 조회에서 해당 스티커(id:100)가 유지되는 것 확인

image

@yeonie0309 yeonie0309 self-assigned this Aug 3, 2026

@yangjiae12 yangjiae12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

코멘트 확인 부탁드립니다!

Comment on lines +492 to +493
return sticker.getDeletedAt() == null
|| existingStickerIds.contains(sticker.getId());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

현재는 삭제된 스티커가 기존에 한 번이라도 배치되어 있었는지만 existingStickerIds.contains()로 확인해서, 요청에서 동일한 스티커를 기존보다 여러 개 추가해도 허용될 수 있을 것 같습니다.

삭제된 스티커의 위치 변경은 허용하되 추가 배치는 막아야 한다면, 스티커 ID별 기존 배치 개수와 요청 개수를 비교해 요청 개수가 더 많을 경우 거부하도록 처리하면 좋을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

확인 감사합니다! 기존에는 Set으로 기존 배치 여부만 확인하고 있어서, 삭제된 커스텀 스티커가 기존보다 더 많이 요청되는 케이스를 막지 못할 수 있었습니다.
삭제된 스티커는 기존 배치 유지/위치 변경만 허용하고 추가 배치는 막는 정책이 맞아서, 스티커 ID별 기존 배치 개수와 요청 개수를 비교하도록 수정했습니다.

@yangjiae12 yangjiae12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수정하신 거 확인했습니다! 수고하셨습니다~

@yeonie0309
yeonie0309 merged commit 1427503 into develop Aug 5, 2026
1 check passed
@yangjiae12
yangjiae12 deleted the refactor/224-travel-record-deleted-sticker-update branch August 6, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 여행 기록 수정 시 삭제된 커스텀 스티커 유지 처리

2 participants