Some checks are pending
Automatisch Backend Tests / test (push) Waiting to run
Automatisch CI / linter (push) Waiting to run
Automatisch CI / start-backend-server (push) Waiting to run
Automatisch CI / start-backend-worker (push) Waiting to run
Automatisch CI / build-web (push) Waiting to run
Automatisch UI Tests / test (push) Waiting to run
16 lines
615 B
JavaScript
16 lines
615 B
JavaScript
import ExecutionStep from '../../src/models/execution-step';
|
|
import { createExecution } from './execution';
|
|
import { createStep } from './step';
|
|
|
|
export const createExecutionStep = async (params = {}) => {
|
|
params.executionId = params?.executionId || (await createExecution()).id;
|
|
params.stepId = params?.stepId || (await createStep()).id;
|
|
params.status = params?.status || 'success';
|
|
params.dataIn = params?.dataIn || { dataIn: 'dataIn' };
|
|
params.dataOut = params?.dataOut || { dataOut: 'dataOut' };
|
|
|
|
const executionStep = await ExecutionStep.query().insertAndFetch(params);
|
|
|
|
return executionStep;
|
|
};
|