endpoint name fixed for exported flows
This commit is contained in:
parent
6e772f54c6
commit
300f93dec4
2 changed files with 15 additions and 3 deletions
|
|
@ -232,7 +232,6 @@ const useFlowsManagerStore = create<FlowsManagerStoreType>((set, get) => ({
|
||||||
// addFlowToLocalState(newFlow);
|
// addFlowToLocalState(newFlow);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("folder id", folder_id);
|
|
||||||
const newFlow = createNewFlow(
|
const newFlow = createNewFlow(
|
||||||
flowData!,
|
flowData!,
|
||||||
flow!,
|
flow!,
|
||||||
|
|
@ -263,8 +262,20 @@ const useFlowsManagerStore = create<FlowsManagerStoreType>((set, get) => ({
|
||||||
|
|
||||||
// Return the id
|
// Return the id
|
||||||
return id;
|
return id;
|
||||||
} catch (error) {
|
} catch (error:any) {
|
||||||
// Handle the error if needed
|
console.error(error);
|
||||||
|
if(error.response?.data?.detail){
|
||||||
|
useAlertStore.getState().setErrorData({
|
||||||
|
title: "Could not load flows from database",
|
||||||
|
list: [error.response?.data?.detail],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
useAlertStore.getState().setErrorData({
|
||||||
|
title: "Could not load flows from database",
|
||||||
|
list: [error.message?? "An unexpected error occurred, please try again"],
|
||||||
|
});
|
||||||
|
}
|
||||||
throw error; // Re-throw the error so the caller can handle it if needed
|
throw error; // Re-throw the error so the caller can handle it if needed
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1452,6 +1452,7 @@ export const createNewFlow = (
|
||||||
id: "",
|
id: "",
|
||||||
is_component: flow?.is_component ?? false,
|
is_component: flow?.is_component ?? false,
|
||||||
folder_id: folderId,
|
folder_id: folderId,
|
||||||
|
endpoint_name:flow?.endpoint_name ?? undefined,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue