Skip to content

Commit

Permalink
feat(uploadFlow): Integrate processDataFromFlow to handle flows durin…
Browse files Browse the repository at this point in the history
…g upload, improving data processing efficiency
  • Loading branch information
ogabrielluiz committed Aug 7, 2024
1 parent 5c3f061 commit 3059364
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/frontend/src/hooks/flows/use-upload-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getObjectsFromFilelist } from "@/helpers/get-objects-from-filelist";
import useFlowStore from "@/stores/flowStore";
import useFlowsManagerStore from "@/stores/flowsManagerStore";
import { FlowType } from "@/types/flow";
import { processDataFromFlow } from "@/utils/reactflowUtils";
import useAddFlow from "./use-add-flow";

const useUploadFlow = () => {
Expand Down Expand Up @@ -56,6 +57,10 @@ const useUploadFlow = () => {
}): Promise<void> => {
try {
let flows = await getFlowsToUpload({ files });
for (const flow of flows) {
await processDataFromFlow(flow);
}

if (
isComponent !== undefined &&
flows.every(
Expand Down

0 comments on commit 3059364

Please sign in to comment.