Skip to content

[REFACTOR] 모임 정보 조회 시 모임 식별 토큰 값 반환#153

Merged
parkmineum merged 1 commit intodevfrom
refactor/#152_add_meeting_token
Feb 17, 2026
Merged

[REFACTOR] 모임 정보 조회 시 모임 식별 토큰 값 반환#153
parkmineum merged 1 commit intodevfrom
refactor/#152_add_meeting_token

Conversation

@parkmineum
Copy link
Member

@parkmineum parkmineum commented Feb 17, 2026

🎋 이슈 및 작업중인 브랜치

🔑 주요 내용

  • 모임 정보 조회 시 모임 토큰 값 추가 반환

Check List

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

Summary by CodeRabbit

  • 새로운 기능

    • 회의 상세 정보 및 회의 목록 조회 시 초대 토큰이 포함되어 반환됩니다.
    • 닫힌 회의에서는 초대 토큰이 생성되지 않습니다.
  • 테스트

    • 회의 상세 정보 조회에서 토큰 생성 검증 테스트가 추가되었습니다.

@parkmineum parkmineum self-assigned this Feb 17, 2026
@parkmineum parkmineum added the ♻️ REFACTOR 리팩토링 관련 라벨 label Feb 17, 2026
@parkmineum parkmineum linked an issue Feb 17, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

개요

여러 서비스 계층에 InviteTokenService 의존성을 추가하고, MeetingInfoResponse 응답 객체에 토큰 필드를 포함하여 미팅 조회 시 생성된 초대 토큰을 반환하도록 수정했습니다.

변경사항

Cohort / File(s) 요약
서비스 계층 - 토큰 생성 로직
ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailService.kt, ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/GetMeetingService.kt
InviteTokenService 의존성 추가 및 MeetingInfoResponse 생성 시 inviteTokenService.generateToken(meeting)을 호출하여 토큰 필드에 포함.
토큰 생성 서비스
ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/InviteTokenService.kt
새로운 generateToken(meeting: Meeting): String? 메서드 추가. meeting.isClosed일 때 null 반환, 아니면 meeting.id와 endAt 타임스탬프를 인코딩하여 토큰 생성. generateInviteToken 메서드가 새 메서드를 활용하도록 수정.
응답 DTO
ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/dto/response/MeetingInfoResponse.kt
token: String? = null 필드 추가. Swagger @Schema 어노테이션 포함.
테스트
ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt
InviteTokenService 모킹 추가, 의존성 주입, generateToken 스텁 설정 및 반환된 토큰 값 검증.

코드 리뷰 예상 소요 시간

🎯 3 (보통) | ⏱️ ~25분

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 제목은 모임 정보 조회 시 모임 식별 토큰 값을 반환하는 기능 추가를 정확히 설명하며, 실제 변경사항과 완전히 일치합니다.

✏️ 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 refactor/#152_add_meeting_token

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@github-actions
Copy link

🧪 테스트 결과

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

Results for commit 58d779f.

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: 1

🧹 Nitpick comments (1)
ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt (1)

320-364: 종료된 모임 테스트에서 tokennull인지 검증하면 좋겠습니다.

isClosed = true인 모임은 generateTokennull을 반환해야 합니다. 현재 inviteTokenService가 mock 기본값(null)을 반환하므로 테스트가 통과하지만, 명시적으로 검증하면 토큰 생성 로직의 의도가 테스트에 더 잘 드러납니다.

💚 검증 추가 제안
         assertEquals("종료 모임", result.meetingInfo.title)
         assertTrue(result.participantList.isEmpty())
+        assertEquals(null, result.meetingInfo.token)
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt`
around lines 320 - 364, The test for closed meetings should explicitly assert
that no invite token is produced: after calling
getMeetingDetailService.invoke(meetingId, userId, allowClosed = true) add an
assertion that the returned token field (e.g., result.inviteToken or
result.meetingInfo.token — whichever field holds the invite token in the
response DTO) is null; this makes the intended behavior of
inviteTokenService.generateToken (mock default null) explicit and documents that
closed meetings do not expose tokens. Ensure you reference the same result
property used elsewhere in the test so the assertion compiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/InviteTokenService.kt`:
- Around line 42-50: generateToken currently calls meeting.id.toString() which
will encode the literal "null" when meeting.id is null; update generateToken
(and any callers if needed) to explicitly guard against a null id: check
meeting.id for null at the start of the function and return null (or throw a
defined exception) instead of encoding, so
DataEncoder.encodeWithSeparator(SEPARATOR, meeting.id.toString(), ...) is only
invoked when meeting.id is non-null; reference generateToken, meeting.id,
DataEncoder.encodeWithSeparator, and validateInviteToken when making the change.

---

Nitpick comments:
In
`@ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt`:
- Around line 320-364: The test for closed meetings should explicitly assert
that no invite token is produced: after calling
getMeetingDetailService.invoke(meetingId, userId, allowClosed = true) add an
assertion that the returned token field (e.g., result.inviteToken or
result.meetingInfo.token — whichever field holds the invite token in the
response DTO) is null; this makes the intended behavior of
inviteTokenService.generateToken (mock default null) explicit and documents that
closed meetings do not expose tokens. Ensure you reference the same result
property used elsewhere in the test so the assertion compiles.

@parkmineum parkmineum merged commit 5db91bd into dev Feb 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ REFACTOR 리팩토링 관련 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 모임 정보 조회 시 응답 값에 모임 토큰 포함

1 participant