feat: Add execution serializer
This commit is contained in:
18
packages/backend/src/serializers/execution.js
Normal file
18
packages/backend/src/serializers/execution.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import flowSerializer from './flow.js';
|
||||
|
||||
const executionSerializer = (execution) => {
|
||||
let executionData = {
|
||||
id: execution.id,
|
||||
testRun: execution.testRun,
|
||||
createdAt: execution.createdAt.getTime(),
|
||||
updatedAt: execution.updatedAt.getTime(),
|
||||
};
|
||||
|
||||
if (execution.flow) {
|
||||
executionData.flow = flowSerializer(execution.flow);
|
||||
}
|
||||
|
||||
return executionData;
|
||||
};
|
||||
|
||||
export default executionSerializer;
|
Reference in New Issue
Block a user