refactor(cover): 封面生成API从templates_editor解耦到generation路由 (#1359)
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m52s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m57s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m43s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m45s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m26s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 6m44s
CI/CD Pipeline / Integration Tests (push) Successful in 2m12s
CI/CD Pipeline / Unit Tests (push) Successful in 9m0s
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m38s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 32s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 39s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m14s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m50s
CI/CD Pipeline / Canary Release to Production (push) Failing after 812h14m47s
CI/CD Pipeline / CI Gate (push) Failing after 812h21m45s
CI/CD Pipeline / Production Browser E2E (push) Failing after 812h21m45s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 812h21m45s
CI/CD Pipeline / Build Production API Image (push) Failing after 812h21m46s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 812h30m45s
CI/CD Pipeline / PR Build API Image (push) Failing after 812h30m47s
CI/CD Pipeline / Frontend Lint (push) Failing after 812h30m47s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 812h30m49s
CI/CD Pipeline / Deploy Production (push) Failing after 812h55m15s
CI/CD Pipeline / Build Production Web Image (push) Failing after 812h55m16s
CI/CD Pipeline / PR Build Web Image (push) Failing after 813h4m15s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m52s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m57s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m43s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m45s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m26s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 6m44s
CI/CD Pipeline / Integration Tests (push) Successful in 2m12s
CI/CD Pipeline / Unit Tests (push) Successful in 9m0s
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m38s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 32s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 39s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m14s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m50s
CI/CD Pipeline / Canary Release to Production (push) Failing after 812h14m47s
CI/CD Pipeline / CI Gate (push) Failing after 812h21m45s
CI/CD Pipeline / Production Browser E2E (push) Failing after 812h21m45s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 812h21m45s
CI/CD Pipeline / Build Production API Image (push) Failing after 812h21m46s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 812h30m45s
CI/CD Pipeline / PR Build API Image (push) Failing after 812h30m47s
CI/CD Pipeline / Frontend Lint (push) Failing after 812h30m47s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 812h30m49s
CI/CD Pipeline / Deploy Production (push) Failing after 812h55m15s
CI/CD Pipeline / Build Production Web Image (push) Failing after 812h55m16s
CI/CD Pipeline / PR Build Web Image (push) Failing after 813h4m15s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #1359.
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
/**
|
||||
* AI 推荐 + 封面生成 API
|
||||
* AI 推荐 API
|
||||
*/
|
||||
import apiClient from "../client"
|
||||
import type {
|
||||
AIRecommendRequest,
|
||||
AIRecommendResponse,
|
||||
GenerateCoverRequest,
|
||||
GenerateCoverResponse,
|
||||
} from "./types"
|
||||
import type { AIRecommendRequest, AIRecommendResponse } from "./types"
|
||||
|
||||
/** AI 推荐片段方案 */
|
||||
export async function aiRecommendClips(
|
||||
@@ -17,14 +12,3 @@ export async function aiRecommendClips(
|
||||
const response = await apiClient.post(`/templates/${templateId}/editor/ai-recommend`, data)
|
||||
return response.data
|
||||
}
|
||||
|
||||
/** AI 生成封面 */
|
||||
export async function generateCover(
|
||||
templateId: string,
|
||||
data: GenerateCoverRequest,
|
||||
): Promise<GenerateCoverResponse> {
|
||||
const response = await apiClient.post(`/templates/${templateId}/editor/generate-cover`, data, {
|
||||
timeout: 300000, // 封面生成涉及 MediaKit 抽帧,最长 300 秒
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user