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
301ca63a2d
@ -118,6 +118,7 @@ export default (resTool: ResTool, toolsNames?: string[]) => {
|
|||||||
type: i.type,
|
type: i.type,
|
||||||
describe: i.desc,
|
describe: i.desc,
|
||||||
projectId: resTool.data.projectId,
|
projectId: resTool.data.projectId,
|
||||||
|
startTime: Date.now(),
|
||||||
});
|
});
|
||||||
assetId.push(id);
|
assetId.push(id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,8 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
builder: (table) => {
|
builder: (table) => {
|
||||||
table.integer("id");
|
table.integer("id");
|
||||||
table.string("projectType");
|
table.string("projectType");
|
||||||
table.string("model");
|
table.string("imageModel");
|
||||||
|
table.string("videoModel");
|
||||||
table.text("name");
|
table.text("name");
|
||||||
table.text("intro");
|
table.text("intro");
|
||||||
table.text("type");
|
table.text("type");
|
||||||
|
|||||||
@ -15,10 +15,11 @@ export default router.post(
|
|||||||
type: z.string(),
|
type: z.string(),
|
||||||
artStyle: z.string(),
|
artStyle: z.string(),
|
||||||
videoRatio: z.string(),
|
videoRatio: z.string(),
|
||||||
model: z.string(),
|
imageModel: z.string(),
|
||||||
|
videoModel: z.string(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { projectType, name, intro, type, artStyle, videoRatio, model } = req.body;
|
const { projectType, name, intro, type, artStyle, videoRatio, imageModel, videoModel } = req.body;
|
||||||
|
|
||||||
await u.db("o_project").insert({
|
await u.db("o_project").insert({
|
||||||
projectType,
|
projectType,
|
||||||
@ -28,7 +29,8 @@ export default router.post(
|
|||||||
artStyle,
|
artStyle,
|
||||||
videoRatio,
|
videoRatio,
|
||||||
userId: 1,
|
userId: 1,
|
||||||
model,
|
imageModel,
|
||||||
|
videoModel,
|
||||||
createTime: Date.now(),
|
createTime: Date.now(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -15,10 +15,11 @@ export default router.post(
|
|||||||
type: z.string(),
|
type: z.string(),
|
||||||
artStyle: z.string(),
|
artStyle: z.string(),
|
||||||
videoRatio: z.string(),
|
videoRatio: z.string(),
|
||||||
model: z.string(),
|
imageModel: z.string(),
|
||||||
|
videoModel: z.string(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { id, name, intro, type, artStyle, videoRatio, model } = req.body;
|
const { id, name, intro, type, artStyle, videoRatio, imageModel, videoModel } = req.body;
|
||||||
|
|
||||||
await u.db("o_project").where("id", id).update({
|
await u.db("o_project").where("id", id).update({
|
||||||
name,
|
name,
|
||||||
@ -26,7 +27,8 @@ export default router.post(
|
|||||||
type,
|
type,
|
||||||
artStyle,
|
artStyle,
|
||||||
videoRatio,
|
videoRatio,
|
||||||
model,
|
imageModel,
|
||||||
|
videoModel,
|
||||||
});
|
});
|
||||||
|
|
||||||
res.status(200).send(success({ message: "新增项目成功" }));
|
res.status(200).send(success({ message: "新增项目成功" }));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user