Blog Lab 페이지 추가 (블로그 마케팅 수익화)

4탭 구성: Dashboard, Research, Write, Posts
- BlogMarketing.jsx/css: 키워드 분석, AI 글 생성, 품질 리뷰, 발행 관리
- api.js: blog-marketing API 함수 15개 추가
- routes.jsx + Icons.jsx: Blog Lab 네비게이션 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 19:59:28 +09:00
parent e8e45391ae
commit 74f043bf29
5 changed files with 813 additions and 0 deletions

View File

@@ -423,3 +423,86 @@ export function deleteBlogPost(id) {
return apiDelete(`/api/blog/posts/${id}`);
}
// ── 블로그 마케팅 API ────────────────────────────────────────────────────────
export function getBlogMarketingStatus() {
return apiGet('/api/blog-marketing/status');
}
export function startResearch(keyword) {
return apiPost('/api/blog-marketing/research', { keyword });
}
export function getResearchHistory(limit = 30) {
return apiGet(`/api/blog-marketing/research/history?limit=${limit}`);
}
export function getResearchDetail(id) {
return apiGet(`/api/blog-marketing/research/${id}`);
}
export function deleteResearch(id) {
return apiDelete(`/api/blog-marketing/research/${id}`);
}
export function getBlogMarketingTask(taskId) {
return apiGet(`/api/blog-marketing/task/${encodeURIComponent(taskId)}`);
}
export function startGenerate(keywordId) {
return apiPost('/api/blog-marketing/generate', { keyword_id: keywordId });
}
export function startReview(postId) {
return apiPost(`/api/blog-marketing/review/${postId}`);
}
export function startRegenerate(postId) {
return apiPost(`/api/blog-marketing/regenerate/${postId}`);
}
export function getBlogMarketingPosts(status, limit = 50) {
const qs = new URLSearchParams();
if (status) qs.set('status', status);
if (limit) qs.set('limit', String(limit));
const q = qs.toString();
return apiGet(`/api/blog-marketing/posts${q ? '?' + q : ''}`);
}
export function getBlogMarketingPost(id) {
return apiGet(`/api/blog-marketing/posts/${id}`);
}
export function updateBlogMarketingPost(id, data) {
return apiPut(`/api/blog-marketing/posts/${id}`, data);
}
export function deleteBlogMarketingPost(id) {
return apiDelete(`/api/blog-marketing/posts/${id}`);
}
export function publishBlogMarketingPost(id, naverUrl) {
return apiPost(`/api/blog-marketing/posts/${id}/publish`, { naver_url: naverUrl || '' });
}
export function getBlogMarketingCommissions(postId) {
const qs = postId ? `?post_id=${postId}` : '';
return apiGet(`/api/blog-marketing/commissions${qs}`);
}
export function addBlogMarketingCommission(data) {
return apiPost('/api/blog-marketing/commissions', data);
}
export function updateBlogMarketingCommission(id, data) {
return apiPut(`/api/blog-marketing/commissions/${id}`, data);
}
export function deleteBlogMarketingCommission(id) {
return apiDelete(`/api/blog-marketing/commissions/${id}`);
}
export function getBlogMarketingDashboard() {
return apiGet('/api/blog-marketing/dashboard');
}