# Conflicts:
#	src/router.ts
This commit is contained in:
ACT丶流星雨 2026-03-26 16:25:43 +08:00
commit a9634755b5
3 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,16 @@
import express from "express";
import u from "@/utils";
import { success } from "@/lib/responseFormat";
const router = express.Router();
// 获取生成图片
export default router.post("/", async (req, res) => {
const list = await u.db("o_assets").leftJoin("o_image", "o_assets.id", "=", "o_image.assetsId").where("o_assets.type", "clip").select("*");
const data = await Promise.all(
list.map(async (item) => ({
...item,
filePath: item.filePath ? await u.oss.getFileUrl(item.filePath) : "",
})),
);
res.status(200).send(success(data));
});

View File

@ -104,9 +104,7 @@ export default router.post(
const aiVideo = u.Ai.Video(model);
await aiVideo.run({
systemPrompt,
projectId,
storyboardId,
prompt,
imageBase64: base64.filter((item) => item !== null) as string[],
mode,

View File

@ -116,8 +116,6 @@ class AiImage {
}
interface VideoConfig {
projectId: number; // 项目ID
storyboardId: number; // 关联的分镜ID
systemPrompt?: string; // 系统提示词
prompt: string; //视频提示词
imageBase64: string[]; //输入的图片提示词
mode: string; //模式