feat: Implement execution step serializer
This commit is contained in:
21
packages/backend/src/serializers/execution-step.js
Normal file
21
packages/backend/src/serializers/execution-step.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import stepSerializer from './step.js';
|
||||
|
||||
const executionStepSerializer = (executionStep) => {
|
||||
let executionStepData = {
|
||||
id: executionStep.id,
|
||||
dataIn: executionStep.dataIn,
|
||||
dataOut: executionStep.dataOut,
|
||||
errorDetails: executionStep.errorDetails,
|
||||
status: executionStep.status,
|
||||
createdAt: executionStep.createdAt.getTime(),
|
||||
updatedAt: executionStep.updatedAt.getTime(),
|
||||
};
|
||||
|
||||
if (executionStep.step) {
|
||||
executionStepData.step = stepSerializer(executionStep.step);
|
||||
}
|
||||
|
||||
return executionStepData;
|
||||
};
|
||||
|
||||
export default executionStepSerializer;
|
Reference in New Issue
Block a user