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