From 5d7d8fa3d0421fcd257a6354027816e88e327cea Mon Sep 17 00:00:00 2001 From: Klaus Date: Sat, 13 Jun 2026 21:48:47 +0900 Subject: [PATCH] =?UTF-8?q?docs(creator):=20=EC=B1=84=EB=84=90=20=ED=99=88?= =?UTF-8?q?=20Phase=205=20=EA=B8=B0=EB=A1=9D=EC=9D=84=20=EA=B0=B1=EC=8B=A0?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/20260612_크리에이터_채널_홈_API/plan-task.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/20260612_크리에이터_채널_홈_API/plan-task.md b/docs/20260612_크리에이터_채널_홈_API/plan-task.md index 4c5c3fd6..948bb87e 100644 --- a/docs/20260612_크리에이터_채널_홈_API/plan-task.md +++ b/docs/20260612_크리에이터_채널_홈_API/plan-task.md @@ -550,7 +550,7 @@ data class CreatorChannelSnsResponse( ### Phase 5: web API와 응답 계약 -- [ ] **Task 5.1: Controller 인증 정책과 endpoint 구현** +- [x] **Task 5.1: Controller 인증 정책과 endpoint 구현** - Files: - Create: `src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/adapter/in/web/CreatorChannelHomeController.kt` - Test: `src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/adapter/in/web/CreatorChannelHomeControllerTest.kt` @@ -564,7 +564,7 @@ data class CreatorChannelSnsResponse( - REFACTOR: 인증 null 가드는 기존 v2 controller와 동일하게 `SodaException(messageKey = "common.error.bad_credentials")`를 사용한다. - 기대 결과: 공개 API endpoint와 인증 정책이 고정된다. -- [ ] **Task 5.2: 응답 JSON 필드 계약 고정** +- [x] **Task 5.2: 응답 JSON 필드 계약 고정** - Files: - Modify: `src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/dto/CreatorChannelHomeResponse.kt` - Test: `src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/adapter/in/web/CreatorChannelHomeControllerTest.kt` @@ -697,3 +697,6 @@ data class CreatorChannelSnsResponse( - 2026-06-13: Phase 4 Task 4.1/4.2 GREEN 확인 - `CreatorChannelHomeQueryService`를 추가해 port record를 domain 모델로 조립하고, `Auth.gender` 우선 `effectiveViewerGender`, 조회자 본인 여부, 성인 노출 정책, 최신 오디오 중복 제거, 스케줄 최종 제한/정렬/성인 제외, CloudFront URL 변환을 적용했다. 비크리에이터 예외 구분을 위해 `CreatorChannelHomeQueryPort.findCreatorRole`과 repository 구현을 최소 추가했다. `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.application.CreatorChannelHomeQueryServiceTest --no-daemon` 통과. - 2026-06-13: Phase 4 정리 검증 - `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.domain.CreatorChannelHomeQueryPolicyTest --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.out.persistence.DefaultCreatorChannelHomeQueryRepositoryTest --no-daemon`, `./gradlew ktlintCheck --no-daemon`, `git diff --check` 통과. `rg -n "CreatorChannelHomeController|/api/v2/creator-channels" src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel` 결과 없음. - 2026-06-13: Phase 4 리뷰 보정 RED/GREEN 확인 - 기존 채널 상세 정책과 동일하게 대상 회원 존재 확인 후 차단 관계를 먼저 검사하고 role 검사는 그 다음 수행하도록 조정했다. `findCreatorRole` 별도 port를 제거하고 `CreatorChannelCreatorRecord.role`로 기본 회원 조회 record에서 role을 함께 반환하게 변경했다. 차단 관계가 있으면 대상 회원이 비크리에이터여도 접근 차단 예외가 우선되는 service RED와, 비크리에이터 기본 회원도 role과 함께 반환되는 repository 계약 테스트를 추가했다. `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.application.CreatorChannelHomeQueryServiceTest --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.out.persistence.DefaultCreatorChannelHomeQueryRepositoryTest --no-daemon` 통과. +- 2026-06-13: Phase 5 Task 5.1 RED 확인 - `CreatorChannelHomeControllerTest`를 먼저 추가한 뒤 `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.in.web.CreatorChannelHomeControllerTest --no-daemon` 실행 시 `Unresolved reference: CreatorChannelHomeController` 컴파일 오류를 확인했다. +- 2026-06-13: Phase 5 Task 5.1/5.2 GREEN 확인 - `CreatorChannelHomeController`를 추가해 `GET /api/v2/creator-channels/{creatorId}/home` 인증 회원 endpoint, `common.error.bad_credentials` null guard, `ApiResponse.ok(CreatorChannelHomeResponse.from(...))` 응답을 구현했다. MockMvc 테스트로 비회원 요청 401, 인증 회원 요청의 service creatorId/viewer 전달, 최상위 JSON 필드와 boolean `is` prefix 계약을 고정했다. `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.in.web.CreatorChannelHomeControllerTest --no-daemon` 통과. +- 2026-06-13: Phase 5 회귀/정리 검증 - `./gradlew test --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.in.web.CreatorChannelHomeControllerTest --tests kr.co.vividnext.sodalive.v2.creator.channel.application.CreatorChannelHomeQueryServiceTest --tests kr.co.vividnext.sodalive.v2.creator.channel.adapter.out.persistence.DefaultCreatorChannelHomeQueryRepositoryTest --no-daemon`, `./gradlew ktlintCheck --no-daemon`, `git diff --check`, `./gradlew test --no-daemon` 통과.