major change on how workflow builder works. It now fetches in edit mode all the currently configured workflows

This commit is contained in:
Joao Correia
2025-02-01 22:36:42 +00:00
parent a0229cd971
commit ac539332e6
12 changed files with 159 additions and 56 deletions

View File

@@ -2,7 +2,7 @@
import { ApprovalWorkflow } from "@/interfaces/approval.workflow";
import { sessionOptions } from "@/lib/session";
import { requestUser } from "@/utils/api";
import { updateApprovalWorkflow } from "@/utils/approval.workflows.be";
import { updateConfiguredWorkflow } from "@/utils/approval.workflows.be";
import { withIronSessionApiRoute } from "iron-session/next";
import type { NextApiRequest, NextApiResponse } from "next";
@@ -24,7 +24,7 @@ async function put(req: NextApiRequest, res: NextApiResponse) {
const approvalWorkflow: ApprovalWorkflow = req.body;
if (id && approvalWorkflow) {
await updateApprovalWorkflow(id, approvalWorkflow);
await updateConfiguredWorkflow(approvalWorkflow);
return res.status(204).end();
}
}