refactor: Use objectionjs instead of knex for factories

This commit is contained in:
Faruk AYDIN
2024-02-13 01:49:40 +01:00
parent 697f72ecf4
commit 95f89ba03e
9 changed files with 19 additions and 22 deletions

View File

@@ -1,3 +1,4 @@
import ExecutionStep from '../../src/models/execution-step';
import { createExecution } from './execution';
import { createStep } from './step';
@@ -8,8 +9,7 @@ export const createExecutionStep = async (params = {}) => {
params.dataIn = params?.dataIn || { dataIn: 'dataIn' };
params.dataOut = params?.dataOut || { dataOut: 'dataOut' };
const [executionStep] = await global.knex
.table('executionSteps')
const executionStep = await ExecutionStep.query()
.insert(params)
.returning('*');