Skip to content

in-363-ppl-영상-검색이-안나옴-문제-해결 -> develop - #215

Merged
MINUUUUUUUUUUUU merged 1 commit into
developfrom
in-363-ppl-영상-검색이-안나옴-문제-해결
Jun 30, 2026

Hidden character warning

The head ref may contain hidden characters: "in-363-ppl-\uc601\uc0c1-\uac80\uc0c9\uc774-\uc548\ub098\uc634-\ubb38\uc81c-\ud574\uacb0"
Merged

MINUUUUUUUUUUUU merged 1 commit into
developfrom
in-363-ppl-영상-검색이-안나옴-문제-해결

Conversation

@MINUUUUUUUUUUUU

@MINUUUUUUUUUUUU MINUUUUUUUUUUUU commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Issue


comment

  • /api/v1/brand-collaborations/channels/{channelId} 및 /api/v1/brand-collaborations/channels/{channelId}/analysis 의 channelId path variable 타입을 String(YouTube 채널 ID) → Long(내부 DB ID)으로 변경했습니다.
  • 서비스 내 채널 조회 메서드를 findByYoutubeChannelId → findById로 변경했습니다.

Summary by CodeRabbit

  • 변경 사항
    • 채널 조회 및 분석 API가 채널 식별자를 숫자 ID 기준으로 받도록 변경되었습니다.
    • API 문서의 설명과 예시가 실제 사용 방식에 맞게 업데이트되었습니다.
    • 채널 ID 전달 기준이 정리되어, 더 일관된 요청 형식을 사용할 수 있습니다.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

ChannelBrandHistory의 search 및 analysis 엔드포인트에서 channelId 파라미터 타입을 String에서 Long으로 변경했습니다. 서비스 레이어에서는 channelRepository 조회를 findByYoutubeChannelId에서 findById로 전환했으며, OpenAPI 문서의 설명과 예시도 로그인 응답 기반 channelId로 수정했습니다.

Changes

channelId 타입 String → Long 전환

Layer / File(s) Summary
서비스 레이어 타입 변경 및 레포지토리 조회 전환
src/.../service/ChannelBrandHistoryService.java
search, analysis 메서드의 channelId 파라미터를 Long으로 변경하고, channelRepository 조회를 findByYoutubeChannelId(...)에서 findById(...)로 전환
컨트롤러 및 API 인터페이스 타입/문서 변경
src/.../controller/ChannelBrandHistoryController.java, src/.../controller/ChannelBrandHistoryApi.java
@PathVariable 타입을 Long으로 변경하고, OpenAPI @Parameter description/example 및 @Operation description의 channelId 근거를 로그인 응답 기반으로 수정

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • JECT-Study/inflace-4th-server#130: ChannelBrandHistoryApi/Controller/Service의 초기 구현으로, 이번 PR에서 변경된 channelId 관련 로직의 원형이 포함되어 있음
  • JECT-Study/inflace-4th-server#170: ChannelBrandHistoryService.analysis(...)를 YouTube API 대신 DB 기반으로 리팩터링한 PR로, 이번 타입 변경과 직접적으로 연관됨

Suggested reviewers

  • HanYoonSoo
  • youcastle03

Poem

🐇 토끼가 길을 달리다 보니,
String 표지판이 Long으로 바뀌었네~
YouTube ID는 이제 안녕,
findById로 쏙 찾아가는 길!
타입 하나 바꿨을 뿐인데,
코드가 더 깔끔해졌다네 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive 제목이 브랜치/이슈명처럼 보여 실제 변경점인 channelId 타입 변경을 구체적으로 요약하지 못합니다. 채널 PPL 히스토리 API의 channelId를 String에서 Long으로 변경했다는 식으로 핵심 변경을 짧고 명확하게 적어주세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch in-363-ppl-영상-검색이-안나옴-문제-해결

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java`:
- Around line 33-34: The API documentation is inconsistent because the
`@Operation` description on `ChannelBrandHistoryApi` still refers to the old
`(YouTube 채널 ID)` wording while the `channelId` parameter is now documented as a
numeric channel ID. Update the `@Operation` text in the same controller so it
matches the `@Parameter` for `channelId`, and keep the terminology consistent
with the new identifier across the method documentation.

In
`@src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java`:
- Line 26: The `ChannelBrandHistoryController` path variable semantics are
changing from YouTube channel ID to internal DB ID under the same `v1` URI,
which breaks existing clients that still send `UC...` values. Update the
controller contract so `channelId` remains backward compatible, or split the new
internal-ID behavior into a separate `/v2` endpoint; if both must coexist,
adjust the controller methods to accept both identifiers during a migration
period.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1612b686-ec77-46a7-816d-ee51c09b9705

📥 Commits

Reviewing files that changed from the base of the PR and between d6f5d9f and 19769a7.

📒 Files selected for processing (3)
  • src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java
  • src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java
  • src/main/java/com/example/inflace/domain/brandcollaboration/service/ChannelBrandHistoryService.java

Comment on lines +33 to +34
@Parameter(description = "채널 ID", example = "1701")
@PathVariable Long channelId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

검색 API 설명이 아직 이전 식별자를 가리킵니다.

@Parameter는 숫자형 채널 ID로 바뀌었는데, @Operation 설명의 Line 24는 아직 (YouTube 채널 ID)라고 적혀 있습니다. 이 상태로는 생성된 OpenAPI에서 같은 파라미터를 서로 다르게 설명하게 됩니다.

문서 문구 정리 예시
-                    - `channelId`는 Path Variable로 전달합니다. (YouTube 채널 ID)
+                    - `channelId`는 Path Variable로 전달합니다. (로그인 응답의 channelId)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryApi.java`
around lines 33 - 34, The API documentation is inconsistent because the
`@Operation` description on `ChannelBrandHistoryApi` still refers to the old
`(YouTube 채널 ID)` wording while the `channelId` parameter is now documented as a
numeric channel ID. Update the `@Operation` text in the same controller so it
matches the `@Parameter` for `channelId`, and keep the terminology consistent
with the new identifier across the method documentation.

@GetMapping("/{channelId}")
public BaseResponse<CursorSliceResponse<ChannelBrandHistoryVideoResponse>> search(
@PathVariable String channelId,
@PathVariable Long channelId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

같은 v1 경로에서 식별자 의미를 바꾸면 기존 클라이언트가 바로 깨집니다.

이 변경은 URI는 그대로 두고 channelId를 YouTube 채널 ID에서 내부 DB ID로 바꾸기 때문에, 기존 호출자가 보내던 "UC..." 값은 이제 컨트롤러 바인딩 단계에서 400으로 떨어집니다. 호환성 계획이 없다면 /v2로 분리하거나, 일정 기간 두 식별자를 함께 받아서 마이그레이션할 수 있게 해야 합니다.

Also applies to: 35-35

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/example/inflace/domain/brandcollaboration/controller/ChannelBrandHistoryController.java`
at line 26, The `ChannelBrandHistoryController` path variable semantics are
changing from YouTube channel ID to internal DB ID under the same `v1` URI,
which breaks existing clients that still send `UC...` values. Update the
controller contract so `channelId` remains backward compatible, or split the new
internal-ID behavior into a separate `/v2` endpoint; if both must coexist,
adjust the controller methods to accept both identifiers during a migration
period.

@youcastle03 youcastle03 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

고생하셨습니다!!

@MINUUUUUUUUUUUU
MINUUUUUUUUUUUU merged commit 2ca48fd into develop Jun 30, 2026
3 checks passed
@MINUUUUUUUUUUUU
MINUUUUUUUUUUUU deleted the in-363-ppl-영상-검색이-안나옴-문제-해결 branch June 30, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants