添加错误返回,项目表添加自增id

This commit is contained in:
小帅 2026-04-04 18:34:54 +08:00
parent 0f04b0649c
commit 5559c67c47
3 changed files with 40 additions and 18 deletions

View File

@ -43,6 +43,7 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
table.integer("createTime"); table.integer("createTime");
table.integer("userId"); table.integer("userId");
table.primary(["id"]); table.primary(["id"]);
table.unique(["id"]);
}, },
}, },
//风格表 //风格表

View File

@ -92,6 +92,7 @@ export default router.post(
)}, )},
`; `;
try {
const { text } = await u.Ai.Text("universalAi").invoke({ const { text } = await u.Ai.Text("universalAi").invoke({
system: videoPrompt?.data!, system: videoPrompt?.data!,
messages: [ messages: [
@ -109,5 +110,8 @@ export default router.post(
prompt: text, prompt: text,
}); });
res.status(200).send(success(text)); res.status(200).send(success(text));
} catch (error) {
res.status(500).send(error);
}
}, },
); );

View File

@ -1,6 +1,22 @@
// @db-hash 6fa5017e455bc367c9c902ba574d11b4 // @db-hash 19c726e36479d905346c772cfa8007ba
//该文件由脚本自动生成,请勿手动修改 //该文件由脚本自动生成,请勿手动修改
export interface _o_project_old_20260404 {
'artStyle'?: string | null;
'createTime'?: number | null;
'directorManual'?: string | null;
'id'?: number | null;
'imageModel'?: string | null;
'imageQuality'?: string | null;
'intro'?: string | null;
'mode'?: string | null;
'name'?: string | null;
'projectType'?: string | null;
'type'?: string | null;
'userId'?: number | null;
'videoModel'?: string | null;
'videoRatio'?: string | null;
}
export interface memories { export interface memories {
'content': string; 'content': string;
'createTime': number; 'createTime': number;
@ -231,6 +247,7 @@ export interface o_videoTrack {
} }
export interface DB { export interface DB {
"_o_project_old_20260404": _o_project_old_20260404;
"memories": memories; "memories": memories;
"o_agentDeploy": o_agentDeploy; "o_agentDeploy": o_agentDeploy;
"o_agentWorkData": o_agentWorkData; "o_agentWorkData": o_agentWorkData;