feat: Implement rest api endpoint to test step

This commit is contained in:
Faruk AYDIN
2024-09-02 13:00:28 +03:00
parent d3dc207166
commit 6ca8e8958a
7 changed files with 274 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
const testStepMock = async (step, lastExecutionStep) => {
const data = {
id: step.id,
appKey: step.appKey,
key: step.key,
iconUrl: step.iconUrl,
lastExecutionStep: {
id: lastExecutionStep.id,
status: lastExecutionStep.status,
dataIn: lastExecutionStep.dataIn,
dataOut: lastExecutionStep.dataOut,
errorDetails: lastExecutionStep.errorDetails,
createdAt: lastExecutionStep.createdAt.getTime(),
updatedAt: lastExecutionStep.updatedAt.getTime(),
},
parameters: step.parameters,
position: step.position,
status: step.status,
type: step.type,
};
return {
data: data,
meta: {
count: 1,
currentPage: null,
isArray: false,
totalPages: null,
type: 'Step',
},
};
};
export default testStepMock;