Skip to content

[OT-294] [FIX]: 숏폼 디테일 originId 및 originMediaType 추가#161

Merged
yubin012 merged 2 commits intodevelopfrom
OT-294-fix/shortform-detail
Mar 12, 2026
Merged

[OT-294] [FIX]: 숏폼 디테일 originId 및 originMediaType 추가#161
yubin012 merged 2 commits intodevelopfrom
OT-294-fix/shortform-detail

Conversation

@arlen02-01
Copy link
Copy Markdown
Contributor

@arlen02-01 arlen02-01 commented Mar 12, 2026

📝 작업 내용

이번 PR에서 작업한 내용을 적어주세요

  • 숏폼 디테일 originId 및 originMediaType 추가

☑️ 체크 리스트

체크 리스트를 확인해주세요

  • 테스트는 잘 통과했나요?
  • 충돌을 해결했나요?
  • 이슈는 등록했나요?
  • 라벨은 등록했나요?

#️⃣ 연관된 이슈

ex) # 이슈번호
close#160

Summary by CodeRabbit

  • 새 기능
    • 숏폼 상세 정보에 원본 영상의 ID와 미디어 타입이 포함되어 더 풍부한 메타데이터를 제공합니다.
  • Chores
    • 관리 인터페이스 접근을 위한 허용 출처(origin)를 관리 서브도메인으로 갱신하여 관리자 웹에서의 요청 호환성을 개선했습니다.

@arlen02-01 arlen02-01 self-assigned this Mar 12, 2026
@arlen02-01 arlen02-01 added the fix 버그 수정 label Mar 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

Walkthrough

ShortFormDetailResponse 레코드에 originId(Long)와 originType(MediaType) 필드를 추가하고, 이를 매퍼와 서비스 로직으로 전달하도록 BackOfficeShortFormMapper 및 BackOfficeShortFormService를 수정했습니다. 또한 CORS 허용 출처를 변경했습니다.

Changes

Cohort / File(s) Summary
DTO 필드 확장
apps/api-admin/src/main/java/com/ott/api_admin/shortform/dto/response/ShortFormDetailResponse.java
레코드 생성자에 Long originId, MediaType originType 필드 추가 및 관련 import 추가.
매퍼 및 서비스 업데이트
apps/api-admin/src/main/java/com/ott/api_admin/shortform/mapper/BackOfficeShortFormMapper.java, apps/api-admin/src/main/java/com/ott/api_admin/shortform/service/BackOfficeShortFormService.java
toShortFormDetailResponse 서명에 originId, originType 파라미터 추가. 서비스에서 Series/Contents 기반으로 originId 및 originType을 계산해 매퍼로 전달하도록 로직 확장.
CORS 설정 변경
apps/api-admin/src/main/java/com/ott/api_admin/config/SecurityConfig.java
허용 출처 패턴을 https://www.openthetaste.cloud 에서 https://admin.openthetaste.cloud 로 변경.

Sequence Diagram(s)

(생성 조건 미충족 — 생략)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 분

Possibly related issues

Possibly related PRs

Suggested reviewers

  • yubin012
  • marulog
🚥 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 풀 리퀘스트 제목이 주요 변경 사항을 명확하게 요약합니다. 숏폼 디테일에 originId와 originMediaType을 추가하는 내용이 정확히 표현되어 있습니다.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch OT-294-fix/shortform-detail

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
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/api-admin/src/main/java/com/ott/api_admin/shortform/dto/response/ShortFormDetailResponse.java`:
- Around line 28-32: The response record currently exposes the field name
originType (record component originType) causing JSON to contain originType
instead of the contracted originMediaType; rename the record component
originType to originMediaType in ShortFormDetailResponse (and update its `@Schema`
to match) and then update any mappers, DTO builders, service method parameters
and usages that reference originType to use originMediaType so the serialized
JSON and all call sites remain consistent with the API contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0b77faa1-7c5d-48f6-8a1d-c53de2fed5e2

📥 Commits

Reviewing files that changed from the base of the PR and between 15c8b02 and c4984e0.

📒 Files selected for processing (3)
  • apps/api-admin/src/main/java/com/ott/api_admin/shortform/dto/response/ShortFormDetailResponse.java
  • apps/api-admin/src/main/java/com/ott/api_admin/shortform/mapper/BackOfficeShortFormMapper.java
  • apps/api-admin/src/main/java/com/ott/api_admin/shortform/service/BackOfficeShortFormService.java

@yubin012
Copy link
Copy Markdown
Contributor

확인했씁니다~~~~

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
apps/api-admin/src/main/java/com/ott/api_admin/config/SecurityConfig.java (1)

48-68: permitAll 목록에 중복 항목이 있습니다.

다음 경로들이 중복으로 정의되어 있습니다:

  • /back-office/swagger-ui/** (lines 56, 63)
  • /back-office/v3/api-docs/** (lines 58, 64)
  • /back-office/swagger-resources/** (lines 59, 65)

기능에는 영향이 없지만, 유지보수성을 위해 중복 제거를 권장합니다.

♻️ 중복 제거 제안
                         .requestMatchers(
                                 "/actuator/health/**",
                                 "/actuator/info",
                                 "/actuator/prometheus",
                                 "/actuator/prometheus/**",
                                 "/back-office/login",
                                 "/back-office/reissue",
                                 "/back-office/swagger-ui.html",
                                 "/back-office/swagger-ui/**",
                                 "/back-office/v3/api-docs",
                                 "/back-office/v3/api-docs/**",
                                 "/back-office/swagger-resources/**",
                                 "/swagger-ui/**",
                                 "/v3/api-docs/**",
-                                "/swagger-resources/**",
-                                "/back-office/swagger-ui/**",
-                                "/back-office/v3/api-docs/**",
-                                "/back-office/swagger-resources/**"
-
-
+                                "/swagger-resources/**"
                         ).permitAll()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/api-admin/src/main/java/com/ott/api_admin/config/SecurityConfig.java`
around lines 48 - 68, In SecurityConfig, the requestMatchers(...) call passed to
permitAll() contains duplicate path entries; remove the repeated occurrences of
"/back-office/swagger-ui/**", "/back-office/v3/api-docs/**", and
"/back-office/swagger-resources/**" from the list so each path appears only once
(update the array/list inside the requestMatchers(...) invocation used before
.permitAll()).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/api-admin/src/main/java/com/ott/api_admin/config/SecurityConfig.java`:
- Around line 48-68: In SecurityConfig, the requestMatchers(...) call passed to
permitAll() contains duplicate path entries; remove the repeated occurrences of
"/back-office/swagger-ui/**", "/back-office/v3/api-docs/**", and
"/back-office/swagger-resources/**" from the list so each path appears only once
(update the array/list inside the requestMatchers(...) invocation used before
.permitAll()).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2e9f92f8-535a-4b78-afc1-c872a5467c68

📥 Commits

Reviewing files that changed from the base of the PR and between c4984e0 and 85dfa26.

📒 Files selected for processing (1)
  • apps/api-admin/src/main/java/com/ott/api_admin/config/SecurityConfig.java

@yubin012 yubin012 merged commit 8e5b7d4 into develop Mar 12, 2026
1 check passed
@phonil phonil deleted the OT-294-fix/shortform-detail branch April 4, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants