File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ const createStep: MutationResolvers['createStep'] = async (
5656 connectionId : input . connection ?. id ,
5757 } )
5858
59- await step . patchFlowLastUpdated ( )
59+ await step . patchFlowLastUpdated ( trx )
6060
6161 return step
6262 } )
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ const deleteStep: MutationResolvers['deleteStep'] = async (
110110 . patch ( { position : raw ( `position - ${ steps . length } ` ) } )
111111 }
112112
113- await steps [ 0 ] . patchFlowLastUpdated ( )
113+ await steps [ 0 ] . patchFlowLastUpdated ( trx )
114114
115115 return await flow
116116 . $query ( trx )
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const updateStep: MutationResolvers['updateStep'] = async (
5757 . withGraphFetched ( 'connection' )
5858
5959 // update the flow's last updated
60- await step . patchFlowLastUpdated ( )
60+ await step . patchFlowLastUpdated ( trx )
6161
6262 return updatedStep
6363 } )
Original file line number Diff line number Diff line change 44 raw ,
55 RelatedQueryBuilder ,
66 type StaticHookArguments ,
7+ Transaction ,
78 ValidationError ,
89} from 'objection'
910import { URL } from 'url'
@@ -192,8 +193,8 @@ class Step extends Base {
192193 return command
193194 }
194195
195- async patchFlowLastUpdated ( ) {
196- await this . $relatedQuery ( 'flow' ) . patch ( {
196+ async patchFlowLastUpdated ( trx ?: Transaction ) {
197+ await this . $relatedQuery ( 'flow' , trx ) . patch ( {
197198 updatedAt : new Date ( ) . toISOString ( ) ,
198199 } )
199200 }
You can’t perform that action at this time.
0 commit comments