Update request node checkin in update node

This commit is contained in:
Logan Cusano
2023-07-21 18:36:21 -04:00
committed by logan
parent cf9deb4841
commit 9ff87403b2

View File

@@ -248,13 +248,13 @@ exports.updateExistingNode = async = (req, res) => {
if (!nodeInfo) { if (!nodeInfo) {
log.WARN("No existing node found with this ID, adding node: ", checkInObject); log.WARN("No existing node found with this ID, adding node: ", checkInObject);
addNewNode(checkInObject, (newNode) => { addNewNode(checkInObject, (newNode) => {
this.requestNodeCheckIn(checkInObject.id); this.requestNodeCheckIn({"params": {"nodeId": checkInObject.id}});
return res.status(201).json({ "updatedKeys": newNode }); return res.status(201).json({ "updatedKeys": newNode });
}); });
} }
else { else {
updateNodeInfo(checkInObject, () => { updateNodeInfo(checkInObject, () => {
this.requestNodeCheckIn(checkInObject.id); this.requestNodeCheckIn({"params": {"nodeId": checkInObject.id}});
return res.status(202).json({ "updatedKeys": checkInObject }); return res.status(202).json({ "updatedKeys": checkInObject });
}); });
} }