资产状态改成已完成
This commit is contained in:
parent
300d3e8ad4
commit
2ba5d2ad37
@ -33,7 +33,7 @@ export default router.post(
|
||||
assetsId: id,
|
||||
filePath: savePath,
|
||||
type: type,
|
||||
state: "生成成功",
|
||||
state: "已完成",
|
||||
});
|
||||
// 更新资产表图片为新图片
|
||||
await u
|
||||
|
||||
@ -50,7 +50,7 @@ export default router.post(
|
||||
filePath: savePath,
|
||||
type,
|
||||
assetsId: id,
|
||||
state: "1",
|
||||
state: '已完成',
|
||||
});
|
||||
await u.db("o_assets").where("id", id).update({
|
||||
imageId: imageId,
|
||||
|
||||
@ -115,7 +115,7 @@ export default router.post("/", validateFields(requestSchema), async (req, res)
|
||||
if (!imageData) return res.status(500).send("资产已被删除");
|
||||
|
||||
await u.db("o_image").where("id", imageId).update({
|
||||
state: "生成成功",
|
||||
state: "已完成",
|
||||
filePath: imagePath,
|
||||
type,
|
||||
model: model.split(":")[1],
|
||||
|
||||
@ -125,7 +125,7 @@ export default router.post(
|
||||
})) as any;
|
||||
|
||||
if (!_output) return res.status(500).send("失败");
|
||||
await u.db("o_assets").where("id", assetsId).update({ prompt: _output, promptState: "生成成功" });
|
||||
await u.db("o_assets").where("id", assetsId).update({ prompt: _output, promptState: "已完成" });
|
||||
|
||||
res.status(200).send(success({ prompt: _output, assetsId }));
|
||||
} catch (e: any) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user