feat: 무빙 포스터 YouTube 업로드 연동

This commit is contained in:
skkim committed 2026-10-16 11:29:42 +09:00
1 parent c659f8c2f9
commit a5b7529f17
4 files changed
+50 -14

No files matched your search

+8 -8
View File
@@ -199,8 +199,8 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
const now = Date.now();
const seoKey =
video?.type === 'ssul'
? `ssul:${video.video_id}`
video && video.type !== 'video'
? `${video.type}:${video.video_id}`
: video?.task_id || null;
const expired = now - loadedAtRef.current > SEO_CACHE_TTL;
@@ -244,20 +244,20 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
/**
* 제목·설명·태그 자동 채움.
*
* `seoKey` 는 호출부가 만든 캐시 키다(ADO2=task_id, 썰박스=`ssul:{id}`).
* 백엔드에 보낼 식별자는 종류마다 다르다 — ADO2 는 task_id(UUID), 썰박스는
* ssul_content.id 문자열이며, 서버가 content_type 으로 어느 테이블을 볼지 가른다.
* `seoKey` 는 호출부가 만든 캐시 키다(ADO2=task_id, 썰박스=`ssul:{id}`, 무빙 포스터=`p2v_video:{id}`).
* 백엔드에 보낼 식별자는 종류마다 다르다 — ADO2 는 task_id(UUID), 썰박스·무빙 포스터는
* 콘텐츠 id 문자열이며, 서버가 content_type 으로 어느 테이블을 볼지 가른다.
*/
const loadAutocomplete = async (seoKey: string) => {
if (!video) return;
const isSsul = video.type === 'ssul';
if (!isSsul && !video.task_id) return;
const byContentId = video.type !== 'video';
if (!byContentId && !video.task_id) return;
setIsLoadingAutoDescription(true);
try {
const requestPayload = {
content_type: video.type,
task_id: isSsul ? String(video.video_id) : video.task_id,
task_id: byContentId ? String(video.video_id) : video.task_id,
};
const autoSeoResponse = await getAutoSeoYoutube(requestPayload);