feat: Implement createEmptyFlow method for user model

This commit is contained in:
Faruk AYDIN
2025-03-10 16:08:52 +01:00
parent 75a7a068f3
commit ac1f644071
4 changed files with 35 additions and 9 deletions

View File

@@ -675,6 +675,14 @@ class User extends Base {
}
}
async createEmptyFlow() {
const flow = await this.$relatedQuery('flows').insertAndFetch({
name: 'Name your flow',
});
return await flow.createInitialSteps();
}
async $beforeInsert(queryContext) {
await super.$beforeInsert(queryContext);