Fix bug in return from addNewNode

- Return the function to get a node from the ID since the add new doesn't return node rows
- Update the controller to send the correct key from the updated object
This commit is contained in:
Logan Cusano
2023-06-18 19:13:03 -04:00
parent 7a040a8e97
commit 878e64fa42
2 changed files with 3 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ exports.addNewNode = async (nodeObject, callback) => {
// Call back the first (and theoretically only) row
// Specify 0 so downstream functions don't have to worry about it
return (callback) ? callback(returnNodeObjectFromRow(sqlResponse)) : returnNodeObjectFromRow(sqlResponse);
return (callback) ? callback(this.getNodeInfoFromId(sqlResponse.insertId)) : this.getNodeInfoFromId(sqlResponse.insertId);
}
/** Update the known info on a node