feat: Implement isOwner flag for connections get flows API endpoint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const getFlowsMock = async (flows, steps) => {
|
||||
const getFlowsMock = async (flows, steps, currentUserId) => {
|
||||
const data = flows.map((flow) => {
|
||||
const flowSteps = steps.filter((step) => step.flowId === flow.id);
|
||||
|
||||
@@ -7,6 +7,7 @@ const getFlowsMock = async (flows, steps) => {
|
||||
id: flow.id,
|
||||
name: flow.name,
|
||||
status: flow.active ? 'published' : 'draft',
|
||||
isOwner: flow.userId === currentUserId,
|
||||
createdAt: flow.createdAt.getTime(),
|
||||
updatedAt: flow.updatedAt.getTime(),
|
||||
steps: flowSteps.map((step) => ({
|
||||
|
||||
Reference in New Issue
Block a user