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