[WTH-520] public용 포지션 목록 조회 api 구현 - #116
Merged
Hidden character warning
The head ref may contain hidden characters: "feat/WTH-520-public\uc6a9-\ud3ec\uc9c0\uc158-\ubaa9\ub85d-\uc870\ud68c-api-\uad6c\ud604"
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hyxklee
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
멤버용 포지션 옵션 목록 조회 API를 추가하고, 포지션 옵션 저장 시 멤버 배정이 불필요하게 초기화되던 문제를 수정합니다.
📝 Changes
What
GET /api/v4/clubs/{clubId}/positions추가 — 활성 멤버라면 관리자가 아니어도 포지션 옵션 목록 (id/name/color/displayOrder)을 조회할 수 있습니다.PUT /api/v4/admin/clubs/{clubId}/positions(포지션 옵션 전체 저장) 호출 시, 요청에 이름이 그대로 남아있는 옵션은 기존 엔티티를 재사용하도록 수정했습니다. 이름이 사라진 옵션만 삭제되고, 그 옵션을 참조하던 멤버만 포지션이 초기화됩니다.Why
positionOptionId필터가 이미 있는데, 정작 멤버가 어떤 포지션 옵션이 있는지 조회할 방법이 없었습니다 (관리자 전용 조회만 존재).save()는 옵션 목록을 항상 hard delete 후 재생성하는 방식이라, 옵션 하나만 추가/이름 변경해도 6개 옵션 전체가 새 id를 받고, 그 옵션들을 참조하던 모든 멤버의 포지션 배정이 null로 초기화되는 부작용이 있었습니다.How
GetClubPositionOptionQueryService.findAllForMember()추가 —ClubMemberPolicy.getActiveMember로 활성 멤버만 검증 (관리자용findAll()은requireAdmin그대로 유지),ClubMemberController에 엔드포인트 연결, 신규 성공 코드POSITION_OPTIONS_FIND_PUBLIC_SUCCESS(11131)추가.PUT /positions요청 계약을 id 기반으로 재설계:ClubPositionOptionRequest에id: Long?추가 —id가 있으면 해당 id의 기존 옵션을 재사용해update()(멤버 배정 보존), 없으면 신규 생성.SaveClubPositionOptionsRequest에deletedPositionIds: List<Long>추가 — FE가 폼의 삭제 버튼으로 지운 옵션 id를 명시적으로 전달하면, 그 옵션을 참조하던 멤버만 정리(clear) 후 삭제.options(수정)와deletedPositionIds(삭제)에 동시에 있으면 신규 에러코드POSITION_OPTION_UPDATE_DELETE_CONFLICT(21123)로 막음.📸 Screenshots / Logs
💡 Reviewer 참고사항
✅ Checklist