feat: write PATCH /v1/flows/:flowId
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const getFlowMock = async (flow, steps) => {
|
||||
const getFlowMock = async (flow, steps = []) => {
|
||||
const data = {
|
||||
active: flow.active,
|
||||
id: flow.id,
|
||||
@@ -6,7 +6,10 @@ const getFlowMock = async (flow, steps) => {
|
||||
status: flow.active ? 'published' : 'draft',
|
||||
createdAt: flow.createdAt.getTime(),
|
||||
updatedAt: flow.updatedAt.getTime(),
|
||||
steps: steps.map((step) => ({
|
||||
};
|
||||
|
||||
if (steps.length) {
|
||||
data.steps = steps.map((step) => ({
|
||||
appKey: step.appKey,
|
||||
iconUrl: step.iconUrl,
|
||||
id: step.id,
|
||||
@@ -16,8 +19,8 @@ const getFlowMock = async (flow, steps) => {
|
||||
status: step.status,
|
||||
type: step.type,
|
||||
webhookUrl: step.webhookUrl,
|
||||
})),
|
||||
};
|
||||
}));
|
||||
}
|
||||
|
||||
return {
|
||||
data: data,
|
||||
|
Reference in New Issue
Block a user