feat: Create empty trigger step when the flow is created
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
247b25cfc4
commit
c07b377de1
@@ -1,4 +1,5 @@
|
||||
import Flow from '../../models/flow';
|
||||
import Step from '../../models/step';
|
||||
import flowType from '../types/flow';
|
||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
||||
|
||||
@@ -7,6 +8,11 @@ const createFlowResolver = async (req: RequestWithCurrentUser) => {
|
||||
userId: req.currentUser.id
|
||||
});
|
||||
|
||||
await Step.query().insert({
|
||||
flowId: flow.id,
|
||||
type: 'trigger'
|
||||
})
|
||||
|
||||
return flow;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user