feat: Implement create flow rest API endpoint
This commit is contained in:
35
packages/backend/test/mocks/rest/api/v1/flows/create-flow.js
Normal file
35
packages/backend/test/mocks/rest/api/v1/flows/create-flow.js
Normal file
@@ -0,0 +1,35 @@
|
||||
const createFlowMock = async (flow) => {
|
||||
const data = {
|
||||
id: flow.id,
|
||||
active: flow.active,
|
||||
name: flow.name,
|
||||
status: flow.status,
|
||||
createdAt: flow.createdAt.getTime(),
|
||||
updatedAt: flow.updatedAt.getTime(),
|
||||
steps: [
|
||||
{
|
||||
position: 1,
|
||||
status: 'incomplete',
|
||||
type: 'trigger',
|
||||
},
|
||||
{
|
||||
position: 2,
|
||||
status: 'incomplete',
|
||||
type: 'action',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
return {
|
||||
data: data,
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'Flow',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default createFlowMock;
|
Reference in New Issue
Block a user