Bugfixes and functional #7 & #9

- #7 needs to error check more
- both need to be cleaned up
This commit is contained in:
Logan Cusano
2023-06-11 04:40:40 -04:00
parent e8d68b2da7
commit f5e119d845
4 changed files with 18 additions and 32 deletions

View File

@@ -24,13 +24,7 @@ async function leaveServerWrapper(clientIdObject) {
log.VERBOSE("Response Object from node ", node, responseObj);
if (!responseObj || !responseObj.statusCode == 202) return false;
// Node has disconnected from discord
// Updating the node object in the DB
node.connected = false;
const updatedNode = await updateNodeInfo(node)
log.DEBUG("Updated Node: ", updatedNode);
// Node has disconnected from discor
// Removing the node connection from the DB
const removedConnection = removeNodeConnectionByNodeId(node.id);
log.DEBUG("Removed Node Connection: ", removedConnection);