fix: dup on update

This commit is contained in:
Methapon Metanipat 2024-10-28 10:18:47 +07:00
parent c45db7332d
commit 333a8aedee

View file

@ -176,6 +176,7 @@ export class FlowTemplateController extends Controller {
...body, ...body,
statusOrder: +(body.status === "INACTIVE"), statusOrder: +(body.status === "INACTIVE"),
step: { step: {
deleteMany: {},
create: body.step.map((v, i) => ({ create: body.step.map((v, i) => ({
type: v.type, type: v.type,
name: v.name, name: v.name,