feat(editor): Workflow history [WIP] - Remove pinned data from workflow history version preview (no-changelog) (#7406)

This commit is contained in:
Csaba Tuncsik
2023-10-19 14:38:00 +02:00
committed by GitHub
parent 82129694c6
commit c7c8048430
6 changed files with 447 additions and 195 deletions

View File

@@ -81,18 +81,16 @@ export const useWorkflowHistoryStore = defineStore('workflowHistory', () => {
workflowId: string,
workflowVersionId: string,
shouldDeactivate: boolean,
) => {
): Promise<IWorkflowDb> => {
const workflowVersion = await getWorkflowVersion(workflowId, workflowVersionId);
if (workflowVersion?.nodes && workflowVersion?.connections) {
const { connections, nodes } = workflowVersion;
const updateData: IWorkflowDataUpdate = { connections, nodes };
const { connections, nodes } = workflowVersion;
const updateData: IWorkflowDataUpdate = { connections, nodes };
if (shouldDeactivate) {
updateData.active = false;
}
await workflowsStore.updateWorkflow(workflowId, updateData, true);
if (shouldDeactivate) {
updateData.active = false;
}
return workflowsStore.updateWorkflow(workflowId, updateData, true);
};
return {