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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user