You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No actionable comments were generated in the recent review.
Walkthrough
Adds a POST endpoint to create invitations for FRIENDS-visible travel records. The service validates the record, inviter, and invitees, then saves invitations and returns their details.
Changes: Invitation creation
Layer / File(s)
Summary
Invitation API contract and endpoint src/main/java/com/yeogido/backend/domain/travel/dto/request/TravelRecordInvitationReqDTO.java, src/main/java/com/yeogido/backend/domain/travel/dto/response/TravelRecordInvitationResDTO.java, src/main/java/com/yeogido/backend/domain/travel/service/TravelRecordInvitationService.java, src/main/java/com/yeogido/backend/domain/travel/controller/TravelRecordInvitationController.java, src/main/java/com/yeogido/backend/domain/travel/converter/TravelRecordInvitationConverter.java
Adds validated invitee IDs as the request, invitation details as the response, and a POST endpoint that delegates invitation creation to the service.
Invitation validation and persistence src/main/java/com/yeogido/backend/domain/travel/exception/TravelRecordErrorCode.java, src/main/java/com/yeogido/backend/domain/travel/repository/TravelRecordInvitationRepository.java, src/main/java/com/yeogido/backend/domain/travel/service/TravelRecordInvitationServiceImpl.java, src/test/java/com/yeogido/backend/domain/travel/service/TravelRecordInvitationIntegrationTest.java
Validates record visibility, inviter permissions, invitee eligibility, and existing invitations. Saves new invitations without granting membership. Integration tests cover validation, persistence, concurrent requests, and HTTP responses.
sequenceDiagram
participant Client
participant TravelRecordInvitationController
participant TravelRecordInvitationServiceImpl
participant TravelRecordInvitationRepository
Client->>TravelRecordInvitationController: POST invitation request
TravelRecordInvitationController->>TravelRecordInvitationServiceImpl: createInvitations
TravelRecordInvitationServiceImpl->>TravelRecordInvitationRepository: find invitations for requested invitees
TravelRecordInvitationRepository-->>TravelRecordInvitationServiceImpl: matching invitations
TravelRecordInvitationServiceImpl->>TravelRecordInvitationRepository: save new invitations
TravelRecordInvitationServiceImpl-->>TravelRecordInvitationController: creation response
TravelRecordInvitationController-->>Client: CREATED response
Loading
Possibly related PRs
yeogido/backend#419: Defines FRIENDS visibility and current-member access, which the invitation service checks.
yeogido/backend#423: Adds the active-record locking query used to serialize invitation creation with deletion and leaving.
yeogido/backend#424: Adds the accepted-friendship query used to validate invitation targets.
Suggested reviewers:yangjiae12, chans20
Merge Risk: Minimal · up to 29889
No actionable invitation or album-deletion failure remains identified; the change is mergeable after normal checks.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly identifies the main change: implementing the shared album invitation API.
Description check
The description includes the change summary, linked issue, review requests, and test results. It also documents invitation validation, duplicate prevention, and permission behavior.
Linked Issues check
#436의 코딩 요구사항을 충족합니다. 요청·응답 DTO, 컨트롤러, 서비스, 변환 로직을 추가했습니다. 서비스는 앨범 행에 PESSIMISTIC_WRITE 잠금을 적용하고, 생성자 또는 현재 참여자 권한, 활성 사용자, ACCEPTED 친구 관계, 자기 자신, 중복 대상, 대기 초대, 현재 참여자를 검증합니다. 전체 검증 후 종료 초대를 정리하고 …
Out of Scope Changes check
변경 사항은 #436의 공유 앨범 친구 초대 API 범위에 있습니다. DTO, API 계층, 도메인 검증, 저장소 조회, 오류 코드, 변환 로직, 관련 통합 테스트만 추가하거나 변경했습니다. 종료 초대 후 재초대 처리는 #436에 명시된 검토안과 직접 연결됩니다. 관련 없는 기능 변경은 확인되지 않습니다.
Docstring Coverage
Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Full details: Linked Issues check
Explanation
#436의 코딩 요구사항을 충족합니다. 요청·응답 DTO, 컨트롤러, 서비스, 변환 로직을 추가했습니다. 서비스는 앨범 행에 PESSIMISTIC_WRITE 잠금을 적용하고, 생성자 또는 현재 참여자 권한, 활성 사용자, ACCEPTED 친구 관계, 자기 자신, 중복 대상, 대기 초대, 현재 참여자를 검증합니다. 전체 검증 후 종료 초대를 정리하고 초대를 함께 저장합니다. 초대 생성 시 참여 관계를 만들지 않습니다. 기존 앨범 잠금 경로와 동시 초대 통합 테스트도 포함합니다. 권한, 롤백, 중복, 상태, HTTP 응답을 검증하는 자동화 테스트가 있습니다. 로컬 Swagger 확인은 수동 검증 항목이므로 코딩 판정에서 제외합니다.
Full details: Docstring Coverage
Explanation
Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 9 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ast-grep (0.51.1)
ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/javascript/security/hardcoded-hmac-key.yml
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
📌 PR 설명
🔗 연관된 이슈
Resolves: #436
📝 리뷰 요구사항
💻 테스트 결과
Summary by CodeRabbit