Skip to content

[FEATURE] 모임 초대 토큰 어댑터 기능 구현#150

Merged
parkmineum merged 2 commits intodevfrom
feature/#149_invite_token_adapter
Jan 29, 2026
Merged

[FEATURE] 모임 초대 토큰 어댑터 기능 구현#150
parkmineum merged 2 commits intodevfrom
feature/#149_invite_token_adapter

Conversation

@parkmineum
Copy link
Member

@parkmineum parkmineum commented Jan 29, 2026

🎋 이슈 및 작업중인 브랜치

🔑 주요 내용

  • 프론트측 요청으로 meeting_id 대신 Invite Token을 넘겨줘도 서버단에서 id로 변환해서 사용하도록 함

Check List

  • Assignees 등록을 하였나요?
  • 라벨(Label) 등록을 하였나요?
  • PR 머지하기 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

Summary by CodeRabbit

  • 새로운 기능
    • API 엔드포인트가 모임 ID 또는 초대 토큰 둘 다 받아 처리하도록 확장됨 (영향: 모임 상세, 이력, 초대토큰 발급, 참석자, 설문 생성, 장소 검색)
  • 테스트
    • 초대 토큰/식별자 파싱 로직에 대한 단위 테스트 추가

✏️ Tip: You can customize this high-level summary in your review settings.

@parkmineum parkmineum self-assigned this Jan 29, 2026
@parkmineum parkmineum linked an issue Jan 29, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Walkthrough

경로 변수나 요청 파라미터로 전달된 숫자, 초대 토큰 또는 초대 URL을 Long meetingId로 변환하는 @MeetingId 애노테이션, 이를 처리하는 HandlerMethodArgumentResolver와 파싱 유틸리티 및 관련 컨트롤러·설정·테스트를 추가합니다.

Changes

Cohort / File(s) Summary
MeetingId 인프라 추가
ssolv-api-common/src/main/kotlin/org/depromeet/team3/common/annotation/MeetingId.kt, ssolv-api-common/src/main/kotlin/org/depromeet/team3/common/resolver/MeetingIdArgumentResolver.kt
새로운 @MeetingId 애노테이션(파라미터 대상, 런타임 유지)과 PathVariable/RequestParam에서 식별자 값을 찾아 MeetingIdParser로 Long으로 변환하는 Spring HandlerMethodArgumentResolver를 추가했습니다.
WebMvc 설정 업데이트
ssolv-api-common/src/main/kotlin/org/depromeet/team3/config/WebMvcConfig.kt
MeetingIdArgumentResolver를 생성자 주입하고 addArgumentResolvers에 등록하도록 WebMvc 구성 변경.
서비스 계층 보조 메서드
ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/InviteTokenService.kt
문자열 식별자를 MeetingIdParser로 파싱해 Long을 반환하는 resolveMeetingId(identifier: String): Long 메서드를 추가했습니다.
컨트롤러들에 @MeetingId 적용
ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/controller/MeetingController.kt, ssolv-api-core/src/main/kotlin/org/depromeet/team3/meetingattendee/controller/AttendeeController.kt, ssolv-api-core/src/main/kotlin/org/depromeet/team3/survey/controller/SurveyController.kt, ssolv-api-place/src/main/kotlin/org/depromeet/team3/place/controller/PlacesSearchController.kt
여러 엔드포인트의 경로 변수/요청 파라미터 바인딩을 @PathVariable/@RequestParam에서 @MeetingId("...")로 변경하고 일부 경로(예: /{identifier}) 및 파라미터 설명을 "모임 ID 또는 초대 토큰"으로 갱신.
파싱 유틸리티 및 테스트 추가
ssolv-global-utils/src/main/kotlin/org/depromeet/team3/util/MeetingIdParser.kt, ssolv-global-utils/src/test/kotlin/org/depromeet/team3/util/MeetingIdParserTest.kt
숫자, 인코딩된 토큰(구분자 기반 디코드) 및 초대 URL에서 meetingId를 추출하는 MeetingIdParser.parse(identifier: String): Long 추가 및 이를 검증하는 단위 테스트(여러 성공/오류 케이스).
설정 파일 소소한 정렬
ssolv-api-core/src/main/resources/application.yml
apple 블록 내 private-key 항목의 위치를 옮겨 정렬함(값 변경 없음).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 일치합니다. 모임 초대 토큰을 meeting ID로 변환하는 어댑터 기능 구현이라는 핵심 변경사항을 명확하게 전달합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#149_invite_token_adapter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In
`@ssolv-api-common/src/main/kotlin/org/depromeet/team3/common/resolver/MeetingIdArgumentResolver.kt`:
- Around line 16-20: The supportsParameter method incorrectly evaluates as true
for primitive Long parameters even when `@MeetingId` is absent; update the boolean
expression in supportsParameter so the annotation check is grouped with the type
checks (i.e., require parameter.hasParameterAnnotation(MeetingId::class.java)
AND one of the Long type checks) to prevent matching parameters without the
MeetingId annotation; modify the condition in supportsParameter (the
MethodParameter-based check) to use parentheses around the annotation check and
the OR of Long::class.javaObjectType / Long::class.java so only parameters
annotated with MeetingId pass.

In
`@ssolv-api-core/src/main/kotlin/org/depromeet/team3/meetingattendee/controller/AttendeeController.kt`:
- Around line 30-31: The `@MeetingId` annotation on the meetingId parameter in
AttendeeController is missing its path-variable value and should match the route
placeholder; update the annotation on the parameter (the method parameter named
meetingId: Long in AttendeeController) to include the path name (e.g.,
`@MeetingId`("meetingId") or value = "meetingId") just like SurveyController so
the binding matches the "{meetingId}" path mapping.

In
`@ssolv-api-core/src/main/kotlin/org/depromeet/team3/survey/controller/SurveyController.kt`:
- Around line 37-38: The `@MeetingId` annotation on the meetingId parameter in
SurveyController (parameter annotated as "@MeetingId meetingId: Long") is
missing its path-variable identifier; update it to include the same identifier
used in the route (e.g., `@MeetingId`("identifier")) so MeetingIdArgumentResolver
can locate the path variable correctly — modify the parameter in
SurveyController.kt to use the explicit identifier string consistent with other
controllers (see MeetingController) and ensure the name matches the
route/path-variable name the resolver expects.

In
`@ssolv-global-utils/src/main/kotlin/org/depromeet/team3/util/MeetingIdParser.kt`:
- Around line 13-20: The current parse in MeetingIdParser (fun parse(identifier:
String): Long) uses identifier.substringAfter("token=") when
identifier.startsWith("http") which returns the whole URL if "token=" is absent;
update the logic to first check identifier.contains("token=") when
startsWith("http") and only use substringAfter("token=") in that case, otherwise
handle the missing token explicitly (e.g., call parseToken(identifier) or throw
a clear IllegalArgumentException) so a full URL is not mistakenly treated as the
token.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

🧪 테스트 결과

164 tests   164 ✅  26s ⏱️
 36 suites    0 💤
 36 files      0 ❌

Results for commit 17db856.

♻️ This comment has been updated with latest results.

@parkmineum parkmineum added the ✨ FEATURE 기능 구현 관련 라벨 label Jan 29, 2026
@parkmineum parkmineum merged commit 8ce2b5f into dev Jan 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ FEATURE 기능 구현 관련 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 모임 초대 토큰 변환 어댑터 구현

1 participant