更新分镜的index
This commit is contained in:
parent
c84f853d92
commit
c0574dd515
@ -14,8 +14,13 @@ export default router.post(
|
|||||||
data: flowDataSchema,
|
data: flowDataSchema,
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { projectId, episodesId } = req.body;
|
const { data, projectId, episodesId } = req.body;
|
||||||
const sqlData = await u.db("o_agentWorkData").where("projectId", String(projectId)).andWhere("episodesId", String(episodesId)).first();
|
const sqlData = await u.db("o_agentWorkData").where("projectId", String(projectId)).andWhere("episodesId", String(episodesId)).first();
|
||||||
|
for (let item of data.storyboard) {
|
||||||
|
await u.db("o_storyboard").where("id", item.id).update({
|
||||||
|
index: item.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!sqlData) {
|
if (!sqlData) {
|
||||||
await u.db("o_agentWorkData").insert({
|
await u.db("o_agentWorkData").insert({
|
||||||
projectId,
|
projectId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user