Merge branch '108' of https://github.com/HBAI-Ltd/Toonflow-app into 108
# Conflicts: # src/types/database.d.ts
This commit is contained in:
commit
187b284c85
@ -308,17 +308,17 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
||||
builder: (table) => {
|
||||
table.integer("id").notNullable();
|
||||
table.integer("scriptId");
|
||||
table.text("name");
|
||||
table.text("title");
|
||||
table.text("prompt");
|
||||
table.text("description");
|
||||
table.text("filePath");
|
||||
table.text("model");
|
||||
table.text("mode");
|
||||
table.text("duration");
|
||||
table.text("resolution");
|
||||
table.text("frameType");
|
||||
table.text("frameMode");
|
||||
table.text("camera");
|
||||
table.text("sound");
|
||||
table.text("associateAssetsIds");
|
||||
table.integer("createTime");
|
||||
table.primary(["id"]);
|
||||
table.unique(["id"]);
|
||||
@ -431,11 +431,20 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
||||
builder: (table) => {
|
||||
table.integer("id").notNullable();
|
||||
table.text("flowData").notNullable();
|
||||
table.integer("stroryboardId").notNullable();
|
||||
table.integer("storyboardId").notNullable();
|
||||
table.primary(["id"]);
|
||||
table.unique(["id"]);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "o_assets2Storyboard",
|
||||
builder: (table) => {
|
||||
table.integer("storyboardId").notNullable();
|
||||
table.integer("assetId").notNullable();
|
||||
table.primary(["assetId", "assetId"]);
|
||||
table.unique(["storyboardId", "assetId"]);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
for (const t of tables) {
|
||||
|
||||
@ -12,7 +12,7 @@ export default router.post(
|
||||
}),
|
||||
async (req, res) => {
|
||||
const { id } = req.body;
|
||||
const storyboardFlowData = await u.db("o_storyboardFlow").where("stroryboardId", id).first();
|
||||
const storyboardFlowData = await u.db("o_storyboardFlow").where("storyboardId", id).first();
|
||||
if (storyboardFlowData?.flowData) {
|
||||
const parseFlow = JSON.parse(storyboardFlowData.flowData);
|
||||
await Promise.all(
|
||||
|
||||
@ -30,7 +30,7 @@ export default router.post(
|
||||
createTime: Date.now(),
|
||||
});
|
||||
await u.db("o_storyboardFlow").insert({
|
||||
stroryboardId: id,
|
||||
storyboardId: id,
|
||||
flowData: JSON.stringify({ edges, nodes }),
|
||||
});
|
||||
return res.status(200).send(success());
|
||||
|
||||
@ -32,7 +32,7 @@ export default router.post(
|
||||
.update({ filePath: new URL(imageUrl).pathname });
|
||||
await u
|
||||
.db("o_storyboardFlow")
|
||||
.where("stroryboardId", id)
|
||||
.where("storyboardId", id)
|
||||
.update({
|
||||
flowData: JSON.stringify({ edges, nodes }),
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user