feat: Add execution serializer

This commit is contained in:
Faruk AYDIN
2024-03-03 18:52:32 +01:00
parent 6236ee8f6d
commit 6d85623d9b
3 changed files with 21 additions and 1 deletions

View 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;