Skip to content

Commit f80e30b

Browse files
committed
fix: add missing params
1 parent e5c9836 commit f80e30b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/backend/src/graphql/mutations/duplicate-branch.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const duplicateBranch: MutationResolvers['duplicateBranch'] = async (
2525
})
2626
.throwIfNotFound()
2727

28-
flow.assertNotUpdatedSince(input.flow.updatedAt)
28+
flow.assertNotUpdatedSince(input.flow.updatedAt, context.currentUser.id)
2929

3030
// create all the steps in the transaction so that if any fails
3131
// this entire query fails
@@ -90,7 +90,11 @@ const duplicateBranch: MutationResolvers['duplicateBranch'] = async (
9090
// was created in the original branch
9191
}
9292

93-
const updatedFlow = await flow.patchLastUpdated({ flowId: flow.id, trx })
93+
const updatedFlow = await flow.patchLastUpdated({
94+
flowId: flow.id,
95+
updatedBy: context.currentUser.id,
96+
trx,
97+
})
9498

9599
return {
96100
steps: newSteps,

packages/backend/src/graphql/mutations/update-flow-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const updateFlowStatus: MutationResolvers['updateFlowStatus'] = async (
5252
return flow
5353
}
5454

55-
flow.assertNotUpdatedSince(params.input.updatedAt)
55+
flow.assertNotUpdatedSince(params.input.updatedAt, context.currentUser.id)
5656

5757
if (params.input.active) {
5858
validateFlowSteps(flow.steps)

packages/backend/src/graphql/mutations/update-step-positions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const updateStepPositions: MutationResolvers['updateStepPositions'] = async (
5050
}
5151

5252
const flow = steps[0].flow
53-
flow.assertNotUpdatedSince(input.flow.updatedAt)
53+
flow.assertNotUpdatedSince(input.flow.updatedAt, context.currentUser.id)
5454

5555
const foundStepIds = steps.map((step) => step.id)
5656
const missingStepIds = stepIds.filter(

0 commit comments

Comments
 (0)