sending flow object to backend
This commit is contained in:
parent
62d75a0446
commit
ad7e975310
1 changed files with 1 additions and 5 deletions
|
|
@ -108,11 +108,7 @@ export default function Chat({ reactFlowInstance }) {
|
||||||
let message = chatValue;
|
let message = chatValue;
|
||||||
setChatValue("");
|
setChatValue("");
|
||||||
addChatHistory(message, true);
|
addChatHistory(message, true);
|
||||||
sendAll({
|
sendAll({...reactFlowInstance.toObject(),message}).then((r) => {addChatHistory(r.data.messsage, false);});
|
||||||
message,
|
|
||||||
nodes: JSON.stringify(reactFlowInstance.getNodes()),
|
|
||||||
edges: JSON.stringify(reactFlowInstance.getEdges()),
|
|
||||||
}).then((r) => {addChatHistory(r.data.messsage, false);});
|
|
||||||
} else {
|
} else {
|
||||||
setErrorData({title: 'Error sending message', list:['Chat nodes are missing.']})
|
setErrorData({title: 'Error sending message', list:['Chat nodes are missing.']})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue