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;
|
||||
setChatValue("");
|
||||
addChatHistory(message, true);
|
||||
sendAll({
|
||||
message,
|
||||
nodes: JSON.stringify(reactFlowInstance.getNodes()),
|
||||
edges: JSON.stringify(reactFlowInstance.getEdges()),
|
||||
}).then((r) => {addChatHistory(r.data.messsage, false);});
|
||||
sendAll({...reactFlowInstance.toObject(),message}).then((r) => {addChatHistory(r.data.messsage, false);});
|
||||
} else {
|
||||
setErrorData({title: 'Error sending message', list:['Chat nodes are missing.']})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue