修复bug
This commit is contained in:
parent
f2e1770533
commit
f635063ec3
@ -86,6 +86,7 @@ export default router.post(
|
||||
} else {
|
||||
try {
|
||||
const storyboardData = await u.db("o_storyboard").where("scriptId", episodesId);
|
||||
|
||||
await Promise.all(
|
||||
storyboardData.map(async (i) => {
|
||||
if (i.filePath) {
|
||||
|
||||
@ -25,7 +25,8 @@ export default router.post(
|
||||
} = req.body;
|
||||
const sqlData = await u.db("o_agentWorkData").where("projectId", String(projectId)).andWhere("episodesId", String(episodesId)).first();
|
||||
const filterDatas = data.storyboard.filter((i) => !i.id);
|
||||
if (data.storyboard && data.storyboard.length && !filterDatas.length)
|
||||
if (data.storyboard && data.storyboard.length && !filterDatas.length) {
|
||||
try {
|
||||
await Promise.all(
|
||||
data.storyboard
|
||||
.filter((i) => i.id)
|
||||
@ -35,6 +36,12 @@ export default router.post(
|
||||
});
|
||||
}),
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("更新分镜排序失败", error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!sqlData) {
|
||||
await u.db("o_agentWorkData").insert({
|
||||
projectId,
|
||||
|
||||
@ -32,9 +32,9 @@ export default router.post(
|
||||
state: item.state,
|
||||
scriptId,
|
||||
projectId,
|
||||
track:item.track,
|
||||
videoDesc:item.videoDesc,
|
||||
shouldGenerateImage:item.shouldGenerateImage,
|
||||
track: item.track,
|
||||
videoDesc: item.videoDesc,
|
||||
shouldGenerateImage: item.shouldGenerateImage,
|
||||
createTime: Date.now(),
|
||||
});
|
||||
if (item.associateAssetsIds?.length) {
|
||||
@ -100,6 +100,7 @@ export default router.post(
|
||||
state: i.state,
|
||||
scriptId: i.scriptId,
|
||||
reason: i.reason,
|
||||
videoDesc: i.videoDesc
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user