Passing local server tests
Some checks failed
Run Socket Server Tests / test (push) Failing after 30s

This commit is contained in:
Logan Cusano
2024-04-07 19:01:00 -04:00
parent 461b449194
commit 4df3de4d4a
3 changed files with 167 additions and 90 deletions

View File

@@ -28,11 +28,14 @@ export const nodeLoginWrapper = async (data, socket) => {
console.log("After grabbing", node);
if (!node) {
const insertedId = await createNode(data);
node = await getNodeByNuid(data.nuid);
console.log("Added new node to the database:", insertedId);
} else {
// Check for updates
const updatedNode = await updateNodeByNuid(data.nuid, data)
console.log("Updated node:", updatedNode);
}
// Check for updates if so
// Check for System updates
node = await getNodeByNuid(data.nuid);
// Add the socket/node connection
socket.node = node;